FORK from https://github.com/andreypopp/configure
ORGINAL AUTHOR Andrey Popp @andreypopp
YAML configuration library which provides:
- interpolation for string configuration values
- configuration inheritance
- configuration composition
- object level configuration (like construct this object by calling some function with some arguments)
$ pip install configure-fork
- Fix imports in newer Python versions. Thx @TheAbhijeet.
Added default value for environment variables resolvers (use ?= after variable name).
config_field_1:!envvar MY_ENV_VAR_1?=1 config_field_2: ENV:MY_ENV_VAR_2?="my value" config_field_3: ENV:MY_ENV_VAR_3?="with \"escaped\" chars \\"
- Github Actions to check PR and publish packages.
- Development version publishing.
- Tests for bytesize and regex resolvers.
- Refactor of directory resolver.
Added ENVVAR resolver in order to allow to use environment variables.
config_field:!envvar PYTHON_PATH
Added implicit resover for ENVVAR resolver:
config_field: ENV:PYTHON_PATH
Modified concat resolver to allow to use environment variables:
config_field: ENV:HOME "/app/" ENV:OTHER_VAR var.in.python
- Changed name in order to allow to publish on pypi
- Python3 (Python2 no compatible any more).
Concatenate variables on configuration:
config_field:!concat var.in.python "/relative/path"
- Support for implicit resolvers from PyYaml.
Added concat implicit resolver:
config_field: var.in.python "/relative/path"
- constructors and multi constructors now can be registered via Configuration.add_constructor and Configuration.add_multi_constructor decorators
- fix serious bug with factory and obj directives: previously they dropped away nested objects such as lists and/or mappings
- configure_logging call now can be made inside config via !logging constructor
- Configuration.configure() now called inside Configuration.{from_file,from_string,from_dict}() class methods, controlled via configure=True keyword argument
- handle kwargs in factory directive
- coerce filename to abs path
- directory — check if it exists and create if not
- interpolate config before YAML parsing
- bytesize
- bugfix release
- add PyYAML to requirements
- fix factories w/o args
- fix configuration of values inside sequences (lists)
- fix
configure_logging
formatters configuration
- remove
configure.module
-- it was a bad idea to synthesize new Python modules on a fly
- added
configure.module
module which allows exposing configuration as synthesized Python module.
Development takes place at https://github.com/alfred82santa/configure