config_resolver.handler package¶
Submodules¶
config_resolver.handler.base module¶
This module contains helpers for type hinting
-
class
config_resolver.handler.base.
Handler
[source]¶ Bases:
typing.Generic
A generic config file handler. Concrete classes should be created in order to support new file formats.
-
DEFAULT_FILENAME
= 'unknown'¶ The filename that is used when the user did not specify a filename when retrieving the config instance
-
static
from_filename
(filename: str) → TConfig[source]¶ Create a configuration instance from a file-name.
-
config_resolver.handler.ini module¶
Handler for INI files
-
class
config_resolver.handler.ini.
IniHandler
[source]¶ Bases:
config_resolver.handler.base.Handler
A config-resolver handler capable of reading “.ini” files.
-
DEFAULT_FILENAME
= 'app.ini'¶
-
static
from_filename
(filename: str) → configparser.ConfigParser[source]¶ Create a configuration instance from a file-name.
-
static
from_string
(data: str) → configparser.ConfigParser[source]¶ Create a configuration instance from a text-string
-
config_resolver.handler.json module¶
Handler for JSON files
-
class
config_resolver.handler.json.
JsonHandler
[source]¶ Bases:
config_resolver.handler.base.Handler
A config-resolver handler capable of reading “.json” files.
-
DEFAULT_FILENAME
= 'app.json'¶
-
static
from_filename
(filename: str) → Dict[str, Any][source]¶ Create a configuration instance from a file-name.
-
static
from_string
(data: str) → Dict[str, Any][source]¶ Create a configuration instance from a text-string
-
Module contents¶
Container package for “handlers”. See Custom Handlers.