fleche.storage.pickle_file
Attributes
Classes
Store values as files on the filesystem using a serialization module. |
|
Bridges |
|
Bridges |
Functions
|
Normalize a secret key value to |
Module Contents
- fleche.storage.pickle_file._normalize_secret_key(key) list[bytes][source]
Normalize a secret key value to
list[bytes].Accepts: -
bytes: wrapped in a list -str: split on":"delimiter, each part encoded to UTF-8 -list[bytes]: each element validated for minimum length -list[str]: each element (or colon-delimited parts) encoded to UTF-8Each resulting key must be at least
_HMAC_MIN_KEY_BYTESbytes long.- Raises:
TypeError – if
keyor any element is notbytesorstr.ValueError – if any resulting key is shorter than
_HMAC_MIN_KEY_BYTES.
- class fleche.storage.pickle_file.PickleFileBackend[source]
Bases:
fleche.storage.file.FileStorageStore values as files on the filesystem using a serialization module.
- classmethod with_pickle(*args, **kwargs)[source]
Construct a PickleFileBackend using the standard pickle module.
- classmethod with_cloudpickle(*args, **kwargs)[source]
Construct a PickleFileBackend using the cloudpickle module.
- class fleche.storage.pickle_file.ValuePickleFile[source]
Bases:
fleche.storage.base.ValueMixin,fleche.storage.base.DestructuringMixin,PickleFileBackendBridges
ValueStoragewithStorageBackendprimitives.Implements
saveandloadusingputandget. Concrete classes inherit from this and aStorageBackendimplementation to get a fully functional value storage.
- class fleche.storage.pickle_file.CallPickleFile[source]
Bases:
fleche.storage.base.CallMixin,PickleFileBackendBridges
CallStoragewithStorageBackendprimitives.Implements
save,load, andqueryusingputandget, deriving the storage key from the call’s lookup key.transformis inherited fromCallStorage.Concrete classes inherit from this and a
StorageBackendimplementation to get a fully functional call storage.