Collection

Metadata

Collection Binding

__bound__

The PyMongo Collection instance this class is bound to, or None if not bound. Primarily meant to be used as a truthy value; utilize .get_collection() to acquire a handle to the PyMongo Collection if intended for use.

DefaultNone

__collection__

The string name of the collection to bind to. Can be used as a truthy value to identify if a Document class is top-level or not.

DefaultNone

__projection__

A read-only calculated property generated at class construction time identifying the default projection to utilize. This is derived from the available fields and their project predicates.

Data Access Options

__read_preference__

The default read preference to utilize when binding. Must be an appropriate attribute value of the PyMongo ReadPreference object or customized instance of a read_preferences class.

DefaultReadPreference.PRIMARY

__read_concern__

The read concern (level of isolation) to utilize when binding. Must be a PyMongo ReadConcern instance.

DefaultReadConcern(level=None)

__write_concern__

The default write concern (level of confirmation) to utilize when binding. Must be a PyMongo WriteConcern instance.

DefaultWriteConcern(w=1, wtimeout=None, j=None, fsync=None)

Storage Options

__collection__

DefaultNone

__collection__

DefaultNone

__collection__

DefaultNone

__collection__

DefaultNone

Last updated