simple
Classes:
-
StorableStream–A storable object that contains a stream of values.
-
StorableValue–A storable object that contains a single value.
StorableStream
dataclass
StorableStream(
value_stream: AsyncIterable[T],
*,
serializer: type[StreamSerializer[T]] | None = None,
storage: type[Storage] | None = None
)
A storable object that contains a stream of values.
Methods:
-
storable_config–Get the configuration for this storable class.
Attributes:
-
serializer(type[StreamSerializer[T]] | None) –The serializer to use for the stream.
-
storage(type[Storage] | None) –The storage to use for the stream.
-
value_stream(AsyncIterable[T]) –The stream of values to store.
serializer
class-attribute
instance-attribute
serializer: type[StreamSerializer[T]] | None = field(
default=None, compare=False
)
The serializer to use for the stream.
storage
class-attribute
instance-attribute
The storage to use for the stream.
storable_config
classmethod
storable_config(
*, allow_none: bool
) -> StorableConfig | None
storable_config(
*, allow_none: Literal[False] = ...
) -> StorableConfig
storable_config(
*, allow_none: bool = False
) -> StorableConfig | None
Get the configuration for this storable class.
StorableValue
dataclass
StorableValue(
value: T,
*,
serializer: type[Serializer[T]] | None = None,
storage: type[Storage] | None = None
)
A storable object that contains a single value.
Methods:
-
storable_config–Get the configuration for this storable class.
Attributes:
-
serializer(type[Serializer[T]] | None) –The serializer to use for the value.
-
storage(type[Storage] | None) –The storage to use for the value.
-
value(T) –The value to store.
serializer
class-attribute
instance-attribute
serializer: type[Serializer[T]] | None = field(
default=None, compare=False
)
The serializer to use for the value.
storage
class-attribute
instance-attribute
The storage to use for the value.
storable_config
classmethod
storable_config(
*, allow_none: bool
) -> StorableConfig | None
storable_config(
*, allow_none: Literal[False] = ...
) -> StorableConfig
storable_config(
*, allow_none: bool = False
) -> StorableConfig | None
Get the configuration for this storable class.