ConsistencyLevel Class

Represents the consistency levels supported for Azure Cosmos client operations.

The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency levels.

Consistency levels by order of strength are Strong, BoundedStaleness, Session, ConsistentPrefix and Eventual.

Inheritance
builtins.object
ConsistencyLevel

Constructor

ConsistencyLevel()

Variables

ConsistencyLevel.Strong
str

Strong Consistency guarantees that read operations always return the value that was last written.

ConsistencyLevel.BoundedStaleness
str

Bounded Staleness guarantees that reads are not too out-of-date. This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds).

ConsistencyLevel.Session
str

Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) within any single session.

ConsistencyLevel.Eventual
str

Eventual Consistency guarantees that reads will return a subset of writes. All writes will be eventually be available for reads.

ConsistencyLevel.ConsistentPrefix
str

ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. All writes will be eventually be available for reads.

Attributes

BoundedStaleness

BoundedStaleness = 'BoundedStaleness'

ConsistentPrefix

ConsistentPrefix = 'ConsistentPrefix'

Eventual

Eventual = 'Eventual'

Session

Session = 'Session'

Strong

Strong = 'Strong'