base
Abstract base class for state clients.
StateClient
¶
Bases: ABC
Abstract base class for reading and writing state from different source systems.
Source code in src/cloe_delta_table_manager/state/clients/base.py
read_state(path, state_type)
abstractmethod
¶
Read state from the source system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Location identifier for the state (interpretation depends on the client). |
required |
state_type
|
type[StateT]
|
The concrete State subclass to deserialize into. |
required |
Returns:
| Type | Description |
|---|---|
StateT
|
A State instance loaded from the source system. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the state does not exist at the given path. |
Source code in src/cloe_delta_table_manager/state/clients/base.py
state_exists(path)
abstractmethod
¶
Check whether a state exists at the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Location identifier for the state. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the state exists, False otherwise. |
Source code in src/cloe_delta_table_manager/state/clients/base.py
write_state(path, state)
abstractmethod
¶
Write state to the source system.
The version in the state metadata is incremented before writing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Location identifier for the state (interpretation depends on the client). |
required |
state
|
State
|
The State instance to persist. |
required |