1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2024-11-30 11:44:19 +00:00
Configuration helper for Python
Find a file
dependabot[bot] 79ed96f70c
🔨️ (deps): Bump ncipollo/release-action from 1.13.0 to 1.14.0
Bumps [ncipollo/release-action](https://github.com/ncipollo/release-action) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/ncipollo/release-action/releases)
- [Commits](https://github.com/ncipollo/release-action/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: ncipollo/release-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-06 08:13:51 +00:00
.github 🔨️ (deps): Bump ncipollo/release-action from 1.13.0 to 1.14.0 2024-02-06 08:13:51 +00:00
.idea Add -m cfig.sample.usage run config 2022-09-06 04:52:06 +02:00
.vscode 🔨 Import VSC settings from Steffo99/template-poetry 2022-04-26 17:39:27 +02:00
cfig Display a fancy error message if cfig.errors.BatchResolutionFailure is raised 2022-09-06 04:51:43 +02:00
docs Advanced docs: describe how to access the result_dict 2022-09-06 04:26:49 +02:00
.gitignore 🎉 First commit 2022-04-13 17:54:53 +02:00
.readthedocs.yml 🔨 Fix readthedocs yml file again 2022-04-19 04:39:37 +02:00
cfig.iml 💥 Yay more changes 2022-04-20 04:15:10 +02:00
LICENSE.txt Rename LICENSE to LICENSE.txt 2022-04-28 18:15:28 +02:00
poetry.lock ⬆️ (deps-dev): Bump pytest from 7.4.0 to 7.4.3 2023-10-27 11:59:38 +02:00
pyproject.toml Allow usage of Python 3.9 and upgrade deps 2023-06-06 19:49:06 +02:00
README.md 💥 Yay more changes 2022-04-20 04:15:10 +02:00

cfig

A configuration manager for Python

 [**Example**](https://github.com/Steffo99/cfig/tree/main/cfig/sample) | [**Documentation**](https://cfig.readthedocs.io/) | [**PyPI**](https://pypi.org/project/cfig/) 
import cfig

config = cfig.Configuration()

@config.required()
def SECRET_KEY(val: str) -> str:
    """Secret string used to manage HTTP session tokens."""
    return val

if __name__ == "__main__":
    config.cli()
from mypackage.mycfig import SECRET_KEY

print(f"My SECRET_KEY is: {SECRET_KEY}")
$ python -m mypackage.mycfig
===== Configuration =====

SECRET_KEY    → Required, but not set.
Secret string used to manage HTTP session tokens.

===== End =====