read_concern – Tools for working with read concern. (original) (raw)

Back to top

View this page

Toggle table of contents sidebar

Tools for working with read concerns.

See also

This module is compatible with both the synchronous and asynchronous PyMongo APIs.

class pymongo.read_concern.ReadConcern(level=None)

Parameters:

level (Optional _[_str]) – (string) The read concern level specifies the level of isolation for read operations. For example, a read operation using a read concern level of majority will only return data that has been written to a majority of nodes. If the level is left unspecified, the server default will be used.

Added in version 3.2.

property document_: dict[str, Any]_

The document representation of this read concern.

Note

ReadConcern is immutable. Mutating the value ofdocument does not mutate this ReadConcern.

property level_: str | None_

The read concern level.

property ok_for_legacy_: bool_

Return True if this read concern is compatible with old wire protocol versions.