calendaring_sync.objects.push module#

How a push ended, as the adapter reports it.

class calendaring_sync.objects.push.Applied(object_id=None)[source]#

Bases: object

The server applied the edit.

object_id#

The object id the server gave the object, for a create whose id the server picks, or when the server moved the object to another id. None keeps the record’s id.

Type:

str | None

Raises:

Examples

An adapter reports a create the server stored under an id it picked:

>>> from calendaring_sync import Applied
>>> Applied("event-17").object_id
'event-17'
class calendaring_sync.objects.push.Rejected[source]#

Bases: object

The server refused the write because something changed since your last sync.

The edit stays pending. The next ingest makes it a conflict only if the object the edit is for changed, and otherwise it’s pushed again.

class calendaring_sync.objects.push.Gone[source]#

Bases: object

The object no longer exists on the server.

A delete is then done; a change becomes a conflict.

class calendaring_sync.objects.push.LogicalKeyTaken(holder=None)[source]#

Bases: object

The server refused a create or a change because another object holds its logical key.

holder#

The object id of the object that holds the key, when the server names it; None when it doesn’t.

Type:

str | None

Raises:
class calendaring_sync.objects.push.NotAllowed(reason=None)[source]#

Bases: object

The server won’t take the edit as it was sent, so sending it again unchanged won’t help.

For example, you may only read the object, or the server won’t store such content. The edit becomes a conflict, which stays open until you resolve it: keep the server’s copy, send new content, delete the object, or send the edit again once the server would take it.

reason#

The server’s explanation, to show to a person, or None if it gave none.

Type:

str | None

Raises:

Examples

An adapter reports a change to an object you may only read, with what the server said, so your application can tell the person why their edit didn’t go out:

>>> from calendaring_sync import NotAllowed
>>> NotAllowed("You may only read this calendar").reason
'You may only read this calendar'
class calendaring_sync.objects.push.Unknown[source]#

Bases: object

The request may or may not have reached the server.

The push stays in flight, and the next complete ingest settles it from what the server then holds.

calendaring_sync.objects.push.PushOutcome: TypeAlias = calendaring_sync.objects.push.Applied | calendaring_sync.objects.push.Rejected | calendaring_sync.objects.push.Gone | calendaring_sync.objects.push.LogicalKeyTaken | calendaring_sync.objects.push.NotAllowed | calendaring_sync.objects.push.Unknown#

Any one of the six.

Last updated on 2026-11-11.