calendaring_sync.objects.change_set module#

A change set, whole or one page of it.

class calendaring_sync.objects.change_set.ChangeSet(scope, since, token, changes, full_listing=False, truncated=False)[source]#

Bases: object

One change set, or one truncated page of it, for one scope.

scope#

The id of the scope it covers.

Type:

str

since#

The sync token it was fetched from, None for a scope that has none. Every page of a full listing carries the scope’s token from before the listing.

Type:

str | None

token#

The token the scope moves to. On a truncated page of an incremental change set that’s the page’s checkpoint. Every page of a full listing carries the same token, the one the listing read before it started, and the scope moves to it when the last page is ingested.

Type:

str

changes#

Each object id mapped to how the object changed. An object appears once. The change set keeps a read-only copy, so changing the mapping it was built from afterwards changes nothing.

Type:

Mapping[str, Changed | Removed | Unchanged]

full_listing#

Whether it lists every object in the scope, rather than only what changed.

Type:

bool

truncated#

Whether more pages follow it.

Type:

bool

Raises:
  • TypeError – If a field has the wrong type.

  • LoneSurrogateError – If the scope id, a token or an object id holds a lone surrogate.

  • ValueError – If an incremental change set reports an object Unchanged, which only a full listing can.

Last updated on 2026-11-11.