Commit Graph

23 Commits

Author SHA1 Message Date
Roman Mogylatov
15fa6c301e
Pydantic settings support (#388)
* Add implementation and basic test

* Add full test coverage + bugfix

* Add test coverage for .from_yaml() method

* Update setup.py, tox and dev requirements

* Stop running pydantic tests on Python 3.5 and below

* Remove pydantic from tox Python < 3.6

* Add example and docs

* Update features block

* Add extra test

* Update changelog
2021-02-03 09:21:32 -05:00
Roman Mogylatov
dfedead4f0 Add yaml tests skipping on Python 3.4 2021-01-25 17:32:22 -05:00
Roman Mogylatov
4cc39fc6eb
369 Add required argument to config from_* methods (#376)
* Update typing stubs

* Update from_yaml() method

* Update from_ini() method

* Update from_dict() method

* Update from_env() method

* Update documentation

* Update changelog

* Update changelog

* Make doc block fix

* Add extra test for from_ini()
2021-01-24 10:27:45 -05:00
Roman Mogylatov
2d49308c16
Configuration strict mode raise on non existing files (#375)
* Update from_yaml()

* Refactor YAML environment variables interpolation

* Update from_ini()

* Refactor UNDEFINED

* Update from_env()

* Update from_dict()

* Update docs

* Update changelog
2021-01-23 22:37:50 -05:00
Roman Mogylatov
500855895b
372 Change yaml loader to safe loader (#373)
* Add safe loader with env interpolation and an arg to provide custom loader

* Add docs

* Update changelog
2021-01-21 18:00:24 -05:00
Roman Mogylatov
9f7dbe89f6 Merge branch 'release/4.10.2' into master 2021-01-20 08:58:32 -05:00
Roman Mogylatov
d74e8248a1
Required config options and strict mode (#360)
* Add strict mode + tests

* Add .required() for configuration option

* Add wiring tests for required() modifier

* Add wiring support

* Add tests for defined None values in required/strict mode

* Add docs

* Update changelog

* Update example doc block
2021-01-16 08:53:40 -05:00
Roman Mogylatov
1c87a9973d Fix a bug in the `Configuration provider to correctly handle overriding by None`. 2021-01-15 06:44:24 -05:00
Roman Mogylatov
18ef566aae Fix issue #319 resulting in configuration.reset_override() not working properly 2020-11-05 10:16:39 -05:00
Roman Mogylatov
f5b97ca92e
Configuration option typed injections (#284)
* Add implementation and tests

* Add docs page and examples

* Revert the api_client miniapp accidental changes
2020-08-24 13:34:47 -04:00
Roman Mogylatov
ea1e79885c
274 Configuration provider redesign (#275)
* Get 1st stable version

* Remove prototype module

* Try fix copying

* Add config itemselector example

* Add doc blocks
2020-08-03 18:01:20 -04:00
Roman Mogylatov
1cd25e701f Add interpolation of environment variables for Configuration provider 2020-06-25 23:16:19 -04:00
Roman Mogylatov
507a832bb8 Add Configuration.from_env() method + refactoring 2020-06-25 12:50:42 -04:00
Roman Mogylatov
65db4f2b1d Fix code style issue 2020-06-24 21:23:05 -04:00
Roman Mogylatov
e22edcdadd Restore configuration methods 2020-06-24 21:04:30 -04:00
Roman Mogylatov
50d8363650 Pin virtualenv to 20.0.23 2020-06-24 17:26:58 -04:00
Roman Mogylatov
52c98bbe49 Comment yaml-related code 2020-06-24 17:16:46 -04:00
Roman Mogylatov
597f5d772f Add default value for name argument of Configuration provider 2020-06-24 16:40:53 -04:00
Roman Mogylatov
a76744805a Add Configuration.from_yaml method 2020-06-24 16:29:44 -04:00
Roman Mogylatov
f95dadfc23 Add Configuration.from_dict() method 2020-06-23 18:09:20 -04:00
Roman Mogylatov
87bb5ff97d Add Configuration.from_ini() method 2020-06-23 16:46:24 -04:00
Roman Mogylatov
e6f096270e
Config linking (#255)
* Add config linking test

* Add provider linking

* Update changelog
2020-06-22 21:52:00 -04:00
Roman Mogylatov
9a785de4b5
Coroutine provider (#206)
* Add coroutine provider examples

* Add coroutine provier

* Update changelog

* Update static analysis travis jobs to python 3.7

* Update coroutine provider implementation for python 3.4

* Update static analysis travis jobs to python 3.6

* Make pycode style happy

* Add tests for coroutine providers

* Make coroutine tests python 2 syntax friendly

* Split tests to python2 and python3

* Refactor coroutine provider tests

* Modify pypy tests running command

* Update coroutine provider docs
2018-10-18 19:39:19 +03:00