├── .gitignore ├── README.md ├── bestconfig ├── __init__.py ├── adapters.py ├── config.py ├── config_provider.py ├── converters.py ├── file_parsers.py ├── source.py └── source_resolver.py ├── docs ├── PY_LIB.md └── TESTS.md ├── examples ├── complex │ ├── README.md │ ├── app │ │ ├── app.yaml │ │ └── main.py │ ├── config.py │ └── dev.env └── simple │ ├── .env │ ├── README.md │ ├── config.yaml │ └── main.py ├── requirements.txt ├── setup.py └── tests ├── __init__.py ├── integration ├── .env ├── config.json ├── config.yaml ├── env_file ├── project │ ├── config.yml │ └── subfolder │ │ ├── main.py │ │ └── module.py ├── settings.ini ├── subdir │ ├── config.py │ └── test_inheritance.py └── test_works.py └── unit ├── .env ├── broken.yaml ├── config.cfg ├── config.ini ├── config.yaml ├── custom.py ├── empty.env ├── empty.ini ├── empty_yaml.yaml ├── settings.py ├── test_adapters.py ├── test_complete_config.py ├── test_config_access.py ├── test_config_file_insert.py ├── test_converters.py └── test_parsers.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/README.md -------------------------------------------------------------------------------- /bestconfig/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/__init__.py -------------------------------------------------------------------------------- /bestconfig/adapters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/adapters.py -------------------------------------------------------------------------------- /bestconfig/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/config.py -------------------------------------------------------------------------------- /bestconfig/config_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/config_provider.py -------------------------------------------------------------------------------- /bestconfig/converters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/converters.py -------------------------------------------------------------------------------- /bestconfig/file_parsers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/file_parsers.py -------------------------------------------------------------------------------- /bestconfig/source.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/source.py -------------------------------------------------------------------------------- /bestconfig/source_resolver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/bestconfig/source_resolver.py -------------------------------------------------------------------------------- /docs/PY_LIB.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/docs/PY_LIB.md -------------------------------------------------------------------------------- /docs/TESTS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/docs/TESTS.md -------------------------------------------------------------------------------- /examples/complex/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/complex/README.md -------------------------------------------------------------------------------- /examples/complex/app/app.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/complex/app/app.yaml -------------------------------------------------------------------------------- /examples/complex/app/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/complex/app/main.py -------------------------------------------------------------------------------- /examples/complex/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/complex/config.py -------------------------------------------------------------------------------- /examples/complex/dev.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/complex/dev.env -------------------------------------------------------------------------------- /examples/simple/.env: -------------------------------------------------------------------------------- 1 | BOT_TOKEN=bigtoken 2 | VALID= -------------------------------------------------------------------------------- /examples/simple/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/simple/README.md -------------------------------------------------------------------------------- /examples/simple/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/simple/config.yaml -------------------------------------------------------------------------------- /examples/simple/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/examples/simple/main.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML>=4.0.0 2 | pytest>=6.2 -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/setup.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/.env -------------------------------------------------------------------------------- /tests/integration/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/config.json -------------------------------------------------------------------------------- /tests/integration/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/config.yaml -------------------------------------------------------------------------------- /tests/integration/env_file: -------------------------------------------------------------------------------- 1 | MY_COOL_CONFIG_VARIABLE=228 -------------------------------------------------------------------------------- /tests/integration/project/config.yml: -------------------------------------------------------------------------------- 1 | VERSION: 1.2 -------------------------------------------------------------------------------- /tests/integration/project/subfolder/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/project/subfolder/main.py -------------------------------------------------------------------------------- /tests/integration/project/subfolder/module.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/project/subfolder/module.py -------------------------------------------------------------------------------- /tests/integration/settings.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/subdir/config.py: -------------------------------------------------------------------------------- 1 | overload = 'hello2' 2 | -------------------------------------------------------------------------------- /tests/integration/subdir/test_inheritance.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/subdir/test_inheritance.py -------------------------------------------------------------------------------- /tests/integration/test_works.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/integration/test_works.py -------------------------------------------------------------------------------- /tests/unit/.env: -------------------------------------------------------------------------------- 1 | VAR=VALUE 2 | 3 | # some comment 4 | #=123 5 | ANOTHER="10" 6 | QUOTES='11' 7 | DEBUG = true 8 | -------------------------------------------------------------------------------- /tests/unit/broken.yaml: -------------------------------------------------------------------------------- 1 | unbalanced blackets: ][ -------------------------------------------------------------------------------- /tests/unit/config.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/config.cfg -------------------------------------------------------------------------------- /tests/unit/config.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/config.ini -------------------------------------------------------------------------------- /tests/unit/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/config.yaml -------------------------------------------------------------------------------- /tests/unit/custom.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | INSERT_VARIABLE = '1' * 10 4 | -------------------------------------------------------------------------------- /tests/unit/empty.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/empty.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/empty_yaml.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/settings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/settings.py -------------------------------------------------------------------------------- /tests/unit/test_adapters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/test_adapters.py -------------------------------------------------------------------------------- /tests/unit/test_complete_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/test_complete_config.py -------------------------------------------------------------------------------- /tests/unit/test_config_access.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/test_config_access.py -------------------------------------------------------------------------------- /tests/unit/test_config_file_insert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/test_config_file_insert.py -------------------------------------------------------------------------------- /tests/unit/test_converters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/test_converters.py -------------------------------------------------------------------------------- /tests/unit/test_parsers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fivol/bestconfig/HEAD/tests/unit/test_parsers.py --------------------------------------------------------------------------------