Secret Ini

class dffml.secret.ini.INISecret(config: Optional[INISourceConfig])[source]
CONFIG

alias of INISecretConfig

CONTEXT

alias of INISecretContext

class dffml.secret.ini.INISecretConfig(filename: str, readwrite: bool = True, allowempty: bool = False)[source]
no_enforce_immutable()

By default, all properties of a config object are immutable. If you would like to mutate immutable properties, you must explicitly call this method using it as a context manager.

Examples

>>> from dffml import config
>>>
>>> @config
... class MyConfig:
...     C: int
>>>
>>> config = MyConfig(C=2)
>>> with config.no_enforce_immutable():
...     config.C = 1
class dffml.secret.ini.INISecretContext(parent: BaseSecret)[source]
async get(name: str) Union[None, str][source]

Get value mapped to name

async set(name: str, value: Any)[source]

Store value and map it to name