nucypher.config¶
Submodules¶
-
class
BaseConfiguration
(config_root: Optional[pathlib.Path] = None, filepath: Optional[pathlib.Path] = None, *args, **kwargs)¶ Bases:
abc.ABC
Abstract base class for saving a JSON serializable version of the subclass’s attributes to the disk exported by static_payload, generating an optionally unique filename, and restoring a subclass instance from the written JSON file by passing the deserialized values to the subclass’s constructor.
Implementation:
NAME and def static_payload are required for subclasses, for example:
class MyItem(BaseConfiguration): _NAME = 'my-item'
AND
def static_payload(self) -> dict: payload = dict(**super().static_payload(), key=value) return payload
OR
def static_payload(self) -> dict: subclass_payload = {'key': 'value'} payload = {**super().static_payload(), **subclass_payload} return payload
Filepath Generation
Default behavior avoids overwriting an existing configuration file:
The name of the JSON file to write/read from is determined by NAME. When calling to_configuration_file.
If the default path (i.e. my-item.json) already exists and, optionally, override is set to False, then a modifer is appended to the name (i.e. my-item-<MODIFIER>.json).
If modifier is None and override is False, FileExistsError will be raised.
If the subclass implementation has a global unique identifier, an additional method override to to_configuration_file will automate the renaming process.
def to_configuration_file(*args, **kwargs) -> str: filepath = super().to_configuration_file(modifier=<MODIFIER>, *args, **kwargs) return filepath
-
NAME
= NotImplemented¶
-
INDENTATION
= 2¶
-
DEFAULT_CONFIG_ROOT
= PosixPath('/home/docs/.local/share/nucypher')¶
-
VERSION
= NotImplemented¶
-
exception
ConfigurationError
¶ Bases:
RuntimeError
-
exception
InvalidConfiguration
¶ Bases:
nucypher.config.base.BaseConfiguration.ConfigurationError
-
exception
NoConfigurationRoot
¶ Bases:
nucypher.config.base.BaseConfiguration.InvalidConfiguration
-
exception
OldVersion
¶ Bases:
nucypher.config.base.BaseConfiguration.InvalidConfiguration
-
abstract
static_payload
() → dict¶ Return a dictionary of JSON serializable configuration key/value pairs matching the input specification of this classes __init__.
Recommended subclass implementations:
` payload = dict(**super().static_payload(), key=value) return payload `
OR
` subclass_payload = {'key': 'value'} payload = {**super().static_payload(), **subclass_payload} return payload `
-
classmethod
generate_filename
(modifier: str = None) → str¶ Generates the configuration filename with an optional modification string.
- Parameters
modifier – String to modify default filename with.
- Returns
The generated filepath string.
-
classmethod
default_filepath
(config_root: Optional[pathlib.Path] = None) → pathlib.Path¶ Generates the default configuration filepath for the class.
- Returns
The generated filepath string
-
generate_filepath
(filepath: Optional[pathlib.Path] = None, modifier: str = None, override: bool = False) → pathlib.Path¶ Generates a filepath for saving to writing to a configuration file.
Default behavior avoids overwriting an existing configuration file:
The filepath exists and a filename modifier is not provided, then FileExistsError will be raised.
The modified filepath exists, then FileExistsError will be raised.
To allow re-generation of an existing filepath, set override to True.
- Parameters
filepath – A custom filepath to use for configuration.
modifier – A unique string to modify the filename if the file already exists.
override – Allow generation of an existing filepath.
- Returns
The generated filepath.
-
classmethod
peek
(filepath: pathlib.Path, field: str) → Optional[str]¶
-
to_configuration_file
(filepath: Optional[pathlib.Path] = None, modifier: str = None, override: bool = False) → pathlib.Path¶
-
classmethod
from_configuration_file
(filepath: Optional[pathlib.Path] = None, **overrides) → nucypher.config.base.BaseConfiguration¶
-
classmethod
deserialize
(payload: str, deserializer=<function loads>, payload_label: Optional[str] = None) → dict¶ Returns the JSON deserialized content of payload
-
update
(filepath: Optional[pathlib.Path] = None, **updates) → None¶
-
class
CharacterConfiguration
(emitter=None, config_root: Optional[pathlib.Path] = None, filepath: Optional[pathlib.Path] = None, dev_mode: bool = False, checksum_address: Optional[str] = None, crypto_power: Optional[nucypher.crypto.powers.CryptoPower] = None, keystore: Optional[nucypher.crypto.keystore.Keystore] = None, keystore_path: Optional[pathlib.Path] = None, learn_on_same_thread: bool = False, abort_on_learning_error: bool = False, start_learning_now: bool = True, domain: str = 'mainnet', network_middleware: Optional[nucypher.network.middleware.RestMiddleware] = None, lonely: bool = False, known_nodes: Optional[set] = None, node_storage: Optional[nucypher.config.storages.NodeStorage] = None, reload_metadata: bool = True, save_metadata: bool = True, poa: Optional[bool] = None, light: bool = False, eth_provider_uri: Optional[str] = None, gas_strategy: Union[Callable, str] = 'fast', max_gas_price: Optional[int] = None, signer_uri: Optional[str] = None, payment_method: Optional[str] = None, payment_provider: Optional[str] = None, payment_network: Optional[str] = None, registry: Optional[nucypher.blockchain.eth.registry.BaseContractRegistry] = None, registry_filepath: Optional[pathlib.Path] = None, policy_registry: Optional[nucypher.blockchain.eth.registry.BaseContractRegistry] = None, policy_registry_filepath: Optional[pathlib.Path] = None)¶ Bases:
nucypher.config.base.BaseConfiguration
‘Sideways Engagement’ of Character classes; a reflection of input parameters.
-
VERSION
= 4¶
-
CHARACTER_CLASS
= NotImplemented¶
-
MNEMONIC_KEYSTORE
= False¶
-
DEFAULT_DOMAIN
= 'mainnet'¶
-
DEFAULT_NETWORK_MIDDLEWARE
¶
-
TEMP_CONFIGURATION_DIR_PREFIX
= 'tmp-nucypher'¶
-
SIGNER_ENVVAR
= None¶
-
known_node_class
¶ alias of
nucypher.characters.lawful.Ursula
-
DEFAULT_GAS_STRATEGY
= 'fast'¶
-
DEFAULT_PAYMENT_METHOD
= 'SubscriptionManager'¶
-
DEFAULT_PAYMENT_NETWORK
= 'polygon'¶
-
property
keystore
¶
-
attach_keystore
(keystore: nucypher.crypto.keystore.Keystore) → None¶
-
classmethod
checksum_address_from_filepath
(filepath: pathlib.Path) → str¶
-
update
(**kwargs) → None¶ A facility for updating existing attributes on existing configuration instances.
Warning: This method allows mutation and may result in an inconsistent configuration.
-
classmethod
generate
(password: str, key_material: Optional[bytes] = None, *args, **kwargs)¶ Shortcut: Hook-up a new initial installation and configuration.
-
property
dev_mode
¶
-
generate_parameters
(**overrides) → dict¶ Warning: This method allows mutation and may result in an inconsistent configuration.
-
produce
(**overrides) → NotImplemented¶ Initialize a new character instance and return it.
-
classmethod
assemble
(filepath: Optional[pathlib.Path] = None, **overrides) → dict¶ Warning: This method allows mutation and may result in an inconsistent configuration.
-
classmethod
from_configuration_file
(filepath: Optional[pathlib.Path] = None, **overrides) → nucypher.config.base.CharacterConfiguration¶ Initialize a CharacterConfiguration from a JSON file.
-
property
dynamic_payload
¶ Exported dynamic configuration values for initializing Ursula. These values are used to init a character instance but are not saved to the JSON configuration.
-
generate_filepath
(filepath: Optional[pathlib.Path] = None, modifier: str = None, override: bool = False) → pathlib.Path¶ Generates a filepath for saving to writing to a configuration file.
Default behavior avoids overwriting an existing configuration file:
The filepath exists and a filename modifier is not provided, then FileExistsError will be raised.
The modified filepath exists, then FileExistsError will be raised.
To allow re-generation of an existing filepath, set override to True.
- Parameters
filepath – A custom filepath to use for configuration.
modifier – A unique string to modify the filename if the file already exists.
override – Allow generation of an existing filepath.
- Returns
The generated filepath.
-
property
runtime_filepaths
¶
-
classmethod
generate_runtime_filepaths
(config_root: pathlib.Path) → dict¶ Dynamically generate paths based on configuration root directory
-
derive_node_power_ups
() → List[nucypher.crypto.powers.CryptoPowerUp]¶
-
initialize
(password: str, key_material: Optional[bytes] = None) → str¶ Initialize a new configuration and write installation files to disk.
-
write_keystore
(password: str, key_material: Optional[bytes] = None, interactive: bool = True) → nucypher.crypto.keystore.Keystore¶
-
configure_payment_method
()¶
-
-
class
UrsulaConfiguration
(rest_host: Optional[str] = None, operator_address: Optional[str] = None, dev_mode: bool = False, keystore_path: Optional[pathlib.Path] = None, rest_port: Optional[int] = None, certificate: Optional[cryptography.x509.base.Certificate] = None, availability_check: Optional[bool] = None, *args, **kwargs)¶ Bases:
nucypher.config.base.CharacterConfiguration
-
class
Ursula
(rest_host: str, rest_port: int, domain: str, is_me: bool = True, certificate: Optional[cryptography.x509.base.Certificate] = None, certificate_filepath: Optional[pathlib.Path] = None, availability_check: bool = False, metadata: Optional[nucypher_core.NodeMetadata] = None, checksum_address: Optional[NewType.<locals>.new_type] = None, operator_address: Optional[NewType.<locals>.new_type] = None, client_password: Optional[str] = None, operator_signature_from_metadata=NOT_SIGNED, eth_provider_uri: Optional[str] = None, payment_method: Union[nucypher.policy.payment.PaymentMethod, nucypher.policy.payment.ContractPayment, None] = None, abort_on_learning_error: bool = False, crypto_power=None, known_nodes: Iterable[nucypher.network.nodes.Teacher] = None, **character_kwargs)¶ Bases:
nucypher.network.nodes.Teacher
,nucypher.characters.base.Character
,nucypher.blockchain.eth.actors.Operator
-
exception
NotEnoughUrsulas
¶ Bases:
nucypher.network.nodes.Learner.NotEnoughTeachers
All Characters depend on knowing about enough Ursulas to perform their role. This exception is raised when a piece of logic can’t proceed without more Ursulas.
-
classmethod
from_metadata_bytes
(metadata_bytes)¶
-
classmethod
from_rest_url
(network_middleware: nucypher.network.middleware.RestMiddleware, host: str, port: int)¶
-
classmethod
from_seed_and_stake_info
(seed_uri: str, minimum_stake: int = 0, registry: nucypher.blockchain.eth.registry.BaseContractRegistry = None, network_middleware: nucypher.network.middleware.RestMiddleware = None) → Union[nucypher.characters.lawful.Ursula, nucypher.network.nodes.NodeSprout]¶
-
classmethod
from_seednode_metadata
(seednode_metadata, *args, **kwargs)¶ Essentially another deserialization method, but this one doesn’t reconstruct a complete node from bytes; instead it’s just enough to connect to and verify a node.
-
classmethod
from_storage
(node_storage: nucypher.config.storages.NodeStorage, checksum_adress: str) → nucypher.characters.lawful.Ursula¶
-
classmethod
from_teacher_uri
(teacher_uri: str, min_stake: int, network_middleware: nucypher.network.middleware.RestMiddleware = None, registry: nucypher.blockchain.eth.registry.BaseContractRegistry = None, retry_attempts: int = 2, retry_interval: int = 2) → nucypher.characters.lawful.Ursula¶
-
get_deployer
()¶
-
interface_info_with_metadata
()¶
-
metadata
()¶
-
property
operator_address
¶
-
property
operator_signature
¶
-
property
operator_signature_from_metadata
¶
-
property
rest_app
¶
-
rest_information
()¶
-
property
rest_interface
¶
-
property
rest_url
¶
-
run
(emitter: nucypher.utilities.emitters.StdoutEmitter = None, discovery: bool = True, availability: bool = False, worker: bool = True, hendrix: bool = True, start_reactor: bool = True, prometheus_config: PrometheusMetricsConfig = None, preflight: bool = True, block_until_ready: bool = True, eager: bool = False) → None¶ Schedule and start select ursula services, then optionally start the reactor.
-
classmethod
seednode_for_network
(network: str) → nucypher.characters.lawful.Ursula¶ Returns a default seednode ursula for a given network.
-
status_info
(omit_known_nodes: bool = False) → nucypher.characters.lawful.LocalUrsulaStatus¶
-
stop
(halt_reactor: bool = False) → None¶ Stop services for partially or fully initialized characters. # CAUTION #
-
property
timestamp
¶
-
exception
-
CHARACTER_CLASS
¶ alias of
nucypher.characters.lawful.Ursula
-
NAME
= 'ursula'¶
-
DEFAULT_REST_PORT
= 9151¶
-
DEFAULT_DEVELOPMENT_REST_HOST
= '127.0.0.1'¶
-
DEFAULT_DEVELOPMENT_REST_PORT
= 10151¶
-
DEFAULT_AVAILABILITY_CHECKS
= False¶
-
LOCAL_SIGNERS_ALLOWED
= True¶
-
SIGNER_ENVVAR
= 'NUCYPHER_OPERATOR_ETH_PASSWORD'¶
-
MNEMONIC_KEYSTORE
= True¶
-
classmethod
checksum_address_from_filepath
(filepath: pathlib.Path) → str¶ Extracts worker address by “peeking” inside the ursula configuration file.
-
generate_runtime_filepaths
(config_root: pathlib.Path) → dict¶ Dynamically generate paths based on configuration root directory
-
generate_filepath
(modifier: str = None, *args, **kwargs) → pathlib.Path¶ Generates a filepath for saving to writing to a configuration file.
Default behavior avoids overwriting an existing configuration file:
The filepath exists and a filename modifier is not provided, then FileExistsError will be raised.
The modified filepath exists, then FileExistsError will be raised.
To allow re-generation of an existing filepath, set override to True.
- Parameters
filepath – A custom filepath to use for configuration.
modifier – A unique string to modify the filename if the file already exists.
override – Allow generation of an existing filepath.
- Returns
The generated filepath.
-
property
dynamic_payload
¶ Exported dynamic configuration values for initializing Ursula. These values are used to init a character instance but are not saved to the JSON configuration.
-
produce
(**overrides)¶ Produce a new Ursula from configuration
-
classmethod
deserialize
(payload: str, deserializer=<function loads>, payload_label: Optional[str] = None) → dict¶ Returns the JSON deserialized content of payload
-
classmethod
assemble
(filepath: Optional[pathlib.Path] = None, **overrides) → dict¶ Warning: This method allows mutation and may result in an inconsistent configuration.
-
class
-
class
AliceConfiguration
(threshold: int = None, shares: int = None, rate: int = None, duration: int = None, *args, **kwargs)¶ Bases:
nucypher.config.base.CharacterConfiguration
-
class
Alice
(is_me: bool = True, eth_provider_uri: str = None, signer=None, checksum_address: Optional[NewType.<locals>.new_type] = None, threshold: Optional[int] = None, shares: Optional[int] = None, rate: int = None, duration: int = None, payment_method: nucypher.policy.payment.PaymentMethod = None, store_policy_credentials: bool = None, timeout: int = 10, network_middleware: nucypher.network.middleware.RestMiddleware = None, *args, **kwargs)¶ Bases:
nucypher.characters.base.Character
,nucypher.blockchain.eth.actors.PolicyAuthor
-
add_active_policy
(active_policy)¶ Adds a Policy object that is active on the NuCypher network to Alice’s active_policies dictionary by the policy ID.
-
create_policy
(bob: nucypher.characters.lawful.Bob, label: bytes, **policy_params)¶ Create a Policy so that Bob has access to all resources under label. Generates KFrags and attaches them.
-
decrypt_message_kit
(label: bytes, message_kit: nucypher_core.MessageKit) → List[bytes]¶ Decrypt this Alice’s own encrypted data.
I/O signatures match Bob’s retrieve interface.
-
generate_kfrags
(bob: nucypher.characters.lawful.Bob, label: bytes, threshold: int = None, shares: int = None) → List¶ Generates re-encryption key frags (“KFrags”) and returns them.
These KFrags can be used by Ursula to re-encrypt a Capsule for Bob so that he can activate the Capsule.
- Parameters
bob – Bob instance which will be able to decrypt messages re-encrypted with these kfrags.
m – Minimum number of kfrags needed to activate a Capsule.
n – Total number of kfrags to generate
-
generate_policy_parameters
(threshold: Optional[int] = None, shares: Optional[int] = None, duration: Optional[int] = None, commencement: Optional[maya.core.MayaDT] = None, expiration: Optional[maya.core.MayaDT] = None, value: Optional[int] = None, rate: Optional[int] = None, payment_method: Optional[nucypher.policy.payment.PaymentMethod] = None) → dict¶ Construct policy creation from default parameters or overrides.
-
get_policy_encrypting_key_from_label
(label: bytes) → umbral.PublicKey¶
-
grant
(bob: nucypher.characters.lawful.Bob, label: bytes, ursulas: set = None, timeout: int = None, **policy_params)¶
-
revoke
(policy: nucypher.policy.policies.Policy, onchain: bool = True, offchain: bool = True) → Tuple[web3.types.TxReceipt, Dict[NewType.<locals>.new_type, Tuple[Revocation, Exception]]]¶
-
-
CHARACTER_CLASS
¶ alias of
nucypher.characters.lawful.Alice
-
NAME
= 'alice'¶
-
DEFAULT_THRESHOLD
= 2¶
-
DEFAULT_SHARES
= 3¶
-
SIGNER_ENVVAR
= 'NUCYPHER_ALICE_ETH_PASSWORD'¶
-
property
dynamic_payload
¶ Exported dynamic configuration values for initializing Ursula. These values are used to init a character instance but are not saved to the JSON configuration.
-
class
-
class
BobConfiguration
(emitter=None, config_root: Optional[pathlib.Path] = None, filepath: Optional[pathlib.Path] = None, dev_mode: bool = False, checksum_address: Optional[str] = None, crypto_power: Optional[nucypher.crypto.powers.CryptoPower] = None, keystore: Optional[nucypher.crypto.keystore.Keystore] = None, keystore_path: Optional[pathlib.Path] = None, learn_on_same_thread: bool = False, abort_on_learning_error: bool = False, start_learning_now: bool = True, domain: str = 'mainnet', network_middleware: Optional[nucypher.network.middleware.RestMiddleware] = None, lonely: bool = False, known_nodes: Optional[set] = None, node_storage: Optional[nucypher.config.storages.NodeStorage] = None, reload_metadata: bool = True, save_metadata: bool = True, poa: Optional[bool] = None, light: bool = False, eth_provider_uri: Optional[str] = None, gas_strategy: Union[Callable, str] = 'fast', max_gas_price: Optional[int] = None, signer_uri: Optional[str] = None, payment_method: Optional[str] = None, payment_provider: Optional[str] = None, payment_network: Optional[str] = None, registry: Optional[nucypher.blockchain.eth.registry.BaseContractRegistry] = None, registry_filepath: Optional[pathlib.Path] = None, policy_registry: Optional[nucypher.blockchain.eth.registry.BaseContractRegistry] = None, policy_registry_filepath: Optional[pathlib.Path] = None)¶ Bases:
nucypher.config.base.CharacterConfiguration
-
class
Bob
(is_me: bool = True, verify_node_bonding: bool = False, eth_provider_uri: str = None, *args, **kwargs)¶ Bases:
nucypher.characters.base.Character
-
exception
IncorrectCFragsReceived
(evidence: List)¶ Bases:
Exception
Raised when Bob detects incorrect CFrags returned by some Ursulas
-
retrieve
(message_kits: Sequence[Union[nucypher_core.MessageKit, nucypher.policy.kits.PolicyMessageKit]], alice_verifying_key: umbral.PublicKey, encrypted_treasure_map: nucypher_core.EncryptedTreasureMap, publisher_verifying_key: Optional[umbral.PublicKey] = None, **context) → List[nucypher.policy.kits.PolicyMessageKit]¶ Attempts to retrieve reencrypted capsule fragments corresponding to given message kits from Ursulas.
Accepts both “clean” message kits (obtained from a side channel) and “loaded” ones (with earlier retrieved capsule frags attached, along with the addresses of Ursulas they were obtained from).
Returns a list of loaded message kits corresponding to the input list, with the kits containing the capsule fragments obtained during the retrieval. These kits can be used as an external cache to preserve the cfrags between several retrieval attempts.
-
exception
-
CHARACTER_CLASS
¶ alias of
nucypher.characters.lawful.Bob
-
NAME
= 'bob'¶
-
SIGNER_ENVVAR
= 'NUCYPHER_BOB_ETH_PASSWORD'¶
-
class
-
SeednodeMetadata
¶ alias of
nucypher.config.constants.seednode
-
class
NodeStorage
(character_class=None, registry: nucypher.blockchain.eth.registry.BaseContractRegistry = None)¶ Bases:
abc.ABC
-
TLS_CERTIFICATE_ENCODING
= 'PEM'¶
-
TLS_CERTIFICATE_EXTENSION
= '.pem'¶
-
exception
UnknownNode
¶ Bases:
nucypher.config.storages.NodeStorage.NodeStorageError
-
abstract property
source
¶ Human readable source string
-
encode_node_bytes
(node_bytes)¶
-
abstract
store_node_certificate
(certificate: cryptography.x509.base.Certificate, port: int) → pathlib.Path¶
-
abstract
store_node_metadata
(node, filepath: Optional[pathlib.Path] = None) → pathlib.Path¶ Save a single node’s metadata and tls certificate
-
abstract
generate_certificate_filepath
(host: str, port: int) → pathlib.Path¶
-
abstract classmethod
from_payload
(data: dict, *args, **kwargs) → nucypher.config.storages.NodeStorage¶ Instantiate a storage object from a dictionary
-
abstract
initialize
()¶ One-time initialization steps to establish a node storage backend
-
-
class
ForgetfulNodeStorage
(parent_dir: Optional[pathlib.Path] = None, *args, **kwargs)¶ Bases:
nucypher.config.storages.NodeStorage
-
property
source
¶ Human readable source string
-
get
(host: str = None, stamp: nucypher.crypto.signing.SignatureStamp = None, certificate_only: bool = False)¶ Retrieve a single stored node
-
store_node_certificate
(certificate: cryptography.x509.base.Certificate, port: int) → pathlib.Path¶
-
store_node_metadata
(node, filepath: Optional[pathlib.Path] = None) → bytes¶ Save a single node’s metadata and tls certificate
-
generate_certificate_filepath
(host: str, port: int) → pathlib.Path¶
-
clear
(metadata: bool = True, certificates: bool = True) → None¶ Forget all stored nodes and certificates
-
classmethod
from_payload
(payload: dict, *args, **kwargs) → nucypher.config.storages.ForgetfulNodeStorage¶ Alternate constructor to create a storage instance from JSON-like configuration
-
initialize
()¶ One-time initialization steps to establish a node storage backend
-
property
-
class
LocalFileBasedNodeStorage
(config_root: Optional[pathlib.Path] = None, storage_root: Optional[pathlib.Path] = None, metadata_dir: Optional[pathlib.Path] = None, certificates_dir: Optional[pathlib.Path] = None, *args, **kwargs)¶ Bases:
nucypher.config.storages.NodeStorage
-
exception
NoNodeMetadataFileFound
¶ Bases:
FileNotFoundError
,nucypher.config.storages.NodeStorage.UnknownNode
-
exception
InvalidNodeMetadata
¶ Bases:
nucypher.config.storages.NodeStorage.NodeStorageError
Node metadata is corrupt or not possible to parse
-
property
source
¶ Human readable source string
-
generate_certificate_filepath
(host: str, port: int) → pathlib.Path¶
-
all
(certificates_only: bool = False) → Set[Union[Any, cryptography.x509.base.Certificate]]¶ Return s set of all stored nodes
-
get
(stamp: Union[nucypher.crypto.signing.SignatureStamp, str], certificate_only: bool = False)¶ Retrieve a single stored node
-
store_node_certificate
(certificate: cryptography.x509.base.Certificate, port: int, force: bool = True)¶
-
store_node_metadata
(node, filepath: Optional[pathlib.Path] = None) → pathlib.Path¶ Save a single node’s metadata and tls certificate
-
clear
(metadata: bool = True, certificates: bool = True) → None¶ Forget all stored nodes and certificates
-
classmethod
from_payload
(payload: dict, *args, **kwargs) → nucypher.config.storages.LocalFileBasedNodeStorage¶ Instantiate a storage object from a dictionary
-
initialize
()¶ One-time initialization steps to establish a node storage backend
-
exception
-
class
TemporaryFileBasedNodeStorage
(*args, **kwargs)¶ Bases:
nucypher.config.storages.LocalFileBasedNodeStorage
-
initialize
()¶ One-time initialization steps to establish a node storage backend
-
-
cast_paths_from
(cls, payload)¶ A serialization helper. Iterates over constructor arguments of cls and cls parents. Finds arguments of type pathlib.Path or Optional[pathlib.Path]. Based on this, it casts corresponding values in payload from str to pathlib.Path or None.