DataStore(bind, name, authenticate=None)¶
Represents a Database on a specific MongoDB Instance.
DataStore keeps track of a specific database on a MongoDB Instance, Cluster or ReplicaSet. The database is represented by its name while MongoDB is represented by an
DataStores are usually created using the
This is the database on MongoDB.
Accessing this property returns the pymongo db, untracked by Ming.
Engine(Connection, conn_args, conn_kwargs, connect_retry, auto_ensure_indexes, _sleep=<built-in function sleep>)¶
Engine represents the connection to a MongoDB (or in-memory database).
Engineclass lazily creates the connection the firs time it’s actually accessed.
This is the pymongo connection itself.
Actually opens the connection to MongoDB.
This is usually done automatically when accessing a database for the first time through the engine.
Creates a new
DataStorefor the database identified by
uriis a mongodb url in the form
mongodb://username:password@address:port/dbname, it can also be used to connect to a replica set by specifying multiple mongodb addresses separated by comma set
Optional Keyword args:
- bind - a
All other keyword args are passed along to
The following are equivalent:
- create_datastore(‘foo’, bind=create_engine())
- bind - a