cfig (0.3.10)
Installation
pip install --index-url cfigAbout this package
A configuration manager for Python
Cfig
Configuration helper for Python
Example
import cfig
config = cfig.Configuration()
@config.required()
def MAX_USERS(val: str) -> int:
"""The maximum number of users that will be able to login to this application."""
try:
return int(val)
except (ValueError, TypeError):
raise cfig.InvalidValueError("Not an int.")
if __name__ == "__main__":
config.cli()
$ python -m myproject.mydefinitionmodule
===== Configuration =====
MAX_USERS → Required, but not set.
The maximum number of users that will be able to login to this application.
===== End =====
See the quickstart guide for more information.
Why?
To make containerizing applications less of a pain.
Links
Tools
Packaging
Documentation
Development
Requirements
Requires Python: >=3.11,<4.0
Details
Assets (2)
Versions (7)
View all
cfig-0.3.10-py3-none-any.whl
14 KiB
cfig-0.3.10.tar.gz
11 KiB