minos.common.config.abc
Classes
MinosConfig class. |
- class Config[source]
Bases:
Config
,InjectableMixin
- property file_path: pathlib.Path
Get the config’s file path.
- Returns
A
Path
instance.
- get_injections()[source]
Get the injections value.
- Returns
A
list
ofInjectableMixin
types.- Return type
- get_default_database()[source]
Get the default database value.
- Returns
A
dict
containing the database’s config values.
- get_middleware()[source]
Get the middleware value.
- Returns
A
list
ofCallable
instances.- Return type
- async destroy()
Destroy miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- classmethod from_config(config=None, **kwargs)
Build a new instance from config.
- Parameters
config (Optional[Union[Config, Path]]) – Config instance. If None is provided, default config is chosen.
kwargs – Additional named arguments.
- Returns
A instance of the called class.
- Return type
S
- async setup()
Setup miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- class MinosConfig[source]
-
MinosConfig class.
- __init__(path, with_environment=True, **kwargs)
- async destroy()
Destroy miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- property file_path: pathlib.Path
Get the config’s file path.
- Returns
A
Path
instance.
- classmethod from_config(config=None, **kwargs)
Build a new instance from config.
- Parameters
config (Optional[Union[Config, Path]]) – Config instance. If None is provided, default config is chosen.
kwargs – Additional named arguments.
- Returns
A instance of the called class.
- Return type
S
- get_aggregate()
Get the aggregate value.
- get_by_key(key)
Get a value by key.
- get_database_by_name(name)
Get the database value by name.
- get_databases()
Get all databases’ values.
- get_default_database()
Get the default database value.
- Returns
A
dict
containing the database’s config values.
- get_discovery()
Get the discovery value.
- get_injections()
Get the injections value.
- Returns
A
list
ofInjectableMixin
types.- Return type
- get_interface_by_name(name)
Get the interface value by name.
- get_interfaces()
Get all interfaces’ values.
- get_middleware()
Get the middleware value.
- Returns
A
list
ofCallable
instances.- Return type
- get_pools()
Get the pools value.
- get_saga()
Get the saga value.
- get_type_by_key(key)
Get a type instance by key.
- async setup()
Setup miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None