fiorix/mongo-async-python-driver — Issue #31: support mongodb uri scheme connections
Author: jamescasbon
Created: 2011-12-03 15:53:34+00:00
State: open

I'm doing this at the moment:

```python
mongo_creds = pymongo.uri_parser.parse_uri(mongo_uri)
# assuming one nodelist
mongo = txmongo.lazyMongoConnectionPool(*mongo_creds['nodelist'][0])
if mongo_creds['database']:
mongo = getattr(mongo, mongo_creds['database'])
if mongo_creds['username']:
mongo.authenticate(mongo_creds['username'], mongo_creds['password'])```