Documentation Index
Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Module
Base classes for lifecycle and state management.SyncState
Enumeration of possible synchronization states for business objects.Attributes
LOCAL_ONLY: Object exists only in memory, not yet persisted remotely. SYNCED: Local and remote states match. DIRTY: Local changes exist that have not been saved. FAILED_SYNC: Last attempt to sync failed. DELETED: Object was deleted remotely, local object still exists.StateManagementMixin
Base mixin for business objects providing lifecycle state management. This mixin provides state tracking and helper methods for objects that need to synchronize between local and remote (API) states. Subclasses may declare a_TRACKED_FIELDS frozenset to enable automatic
dirty-tracking: any assignment to a tracked field on a SYNCED object will
transition it to DIRTY so that callers know a save() is needed.
Attributes
_sync_state: Current synchronization state of the object. _last_error: Last error encountered during synchronization (optional). _TRACKED_FIELDS: frozenset of attribute names whose mutations trigger SYNCED → DIRTY transitions.has_failed
Returns
bool: True if the last sync failed, False otherwise.is_deleted
Returns
bool: True if the object was deleted, False otherwise.is_dirty
Returns
bool: True if the object has unsaved changes, False otherwise.is_local_only
Returns
bool: True if the object has not been persisted, False otherwise.is_synced
Returns
bool: True if the object is synced, False otherwise.refresh
- Fetch the latest state from the API
- Update all local attributes
- Set the state to SYNCED on success