A configuration manager for Python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cfig-0.3.10.tar.gz
(11.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
cfig-0.3.10-py3-none-any.whl
(14.4 kB
view details)
File details
Details for the file cfig-0.3.10.tar.gz.
File metadata
- Download URL: cfig-0.3.10.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c948ee41c90cf2ec375d9e1b9ce851b76428aa03536c688b04d5294154d548b1
|
|
| MD5 |
18069c051b79dc1d3128eb046c77d28a
|
|
| BLAKE2b-256 |
921d9aaee4124547373f379d0f6b39074df1dd3961431c8eb7802df20fe2e05e
|
File details
Details for the file cfig-0.3.10-py3-none-any.whl.
File metadata
- Download URL: cfig-0.3.10-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e1b4826455866882a6d394f21106270998baa082db9415bdfc1858379597b48
|
|
| MD5 |
aacadace63d6e37a5b8b31c2b476b321
|
|
| BLAKE2b-256 |
769eec4c7ff82d7d0d41e331f679345f7db551839138f631489bb9ca4189b20d
|