Config
Path | None
object
Config management.
A class to work with configuration such as reading, writing and deleting.
exists()
bool
Check if any configuration exist.
read()
ValidioConfig
Read persistent configuration.
Will return None if no configuration is created yet.
- Returns: The configuration, or None
- Return type: ValidioConfig | None
- Raises: ConfigNotFoundError if no configuration exists
- Raises: ConfigNotFoundError if the configuration is invalid
remove()
None
Remove the configuration at the instance’s config_path.
write()
required
None
Write the passed configuration to disk.
This will fully overwrite the existing configuration, including any fields that’s not a part of the ValidioConfig.
- Parameters: config – A ValidioConfig object.
ValidioConfig
str
str
str
str
object
Representation of configuration to use in the Validio system and SDK.
access_secret
asdict()
dict[str, str]
Return a dictionary representation of the class.
This is used from our ClassJSONEncoder to ensure we save JSON representing the class with the external property names. By doing this we can also ensure that we can serialize the config by passing the JSON to the constructor.
default_config_dir()
Path
Get the default config dir based on the OS.