calendaring_sync.objects.change module#

The three ways an object can appear in a change set.

class calendaring_sync.objects.change.Changed(version, fingerprint, content, containers=frozenset({}), logical_key=None)[source]#

Bases: object

The object changed on the server, or is new there.

version#

The object’s version, or None if the server gives none.

Type:

str | None

fingerprint#

The object’s fingerprint, computed by the adapter.

Type:

str

content#

The object’s content, the bytes exactly as the server sent them.

Type:

bytes

containers#

The containers the object belongs to.

Type:

frozenset[str]

logical_key#

The object’s logical key, if it has one.

Type:

str | None

Raises:

Examples

An adapter reports an object the server changed, and one it removed, in a change set from token t1 to t2:

>>> from calendaring_sync import Changed, ChangeSet, Removed
>>> changes = {"a": Changed("v2", "fp-a2", b"Team meeting, moved"), "b": Removed()}
>>> change_set = ChangeSet("work", "t1", "t2", changes)
>>> change_set.changes["a"].content
b'Team meeting, moved'
class calendaring_sync.objects.change.Removed[source]#

Bases: object

The object is gone from the server.

class calendaring_sync.objects.change.Unchanged[source]#

Bases: object

The object hasn’t changed since the version the store holds.

Only a full listing reports this, so the object isn’t fetched again.

calendaring_sync.objects.change.Change: TypeAlias = calendaring_sync.objects.change.Changed | calendaring_sync.objects.change.Removed | calendaring_sync.objects.change.Unchanged#

Any one of the three.

Last updated on 2026-11-11.