ZeConfig EN - BR
ZeConfig is a Python library designed to manage application configurations, making it easier to handle sensitive data and environment-specific settings. It supports configuration files in both TOM, JSON, YAML, YML and ENV formats.
Features
- Automatic detection of configuration file location within the current directory or its subdirectories.
- Support for TOML, JSON, YAML, YML and ENV configuration files.
- Easy access to environment-specific keys and values.
Installation
pip install zeconfig
Usage
0. Creating a configuration file
At the root of the project, create a file with one of the extensions .toml, .json, .yaml, .yml or .env.
For example: config.json
1. Configuration File Format
Example config.json
{
"DATABASE_URL": "sqlite:///dev.db",
"SECRET_KEY": "dev-secret"
}
2. Initialize ZeConfig
from ze import config
3. Manage Environment Settings
Retrieve a value for a specific key in the current environment:
DATABASE_URL = config("DATABASE_URL")
print(f"Database URL: {DATABASE_URL}")
>>> OUTPUT:
sqlite:///dev.db
Error Handling
ZeConfig raises descriptive exceptions for common issues:
KeyError: Missing environment or key in the configuration file.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
Contact
For questions or support, please reach out to uadsonpy@gmail.com.
Metadata
Release files for zeconfig 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zeconfig-0.2.3.tar.gz | 6.3 kB | Without provenance | Details for zeconfig-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zeconfig-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for zeconfig-0.2.3-py3-none-any.whl |
Total release size: 11.6 kB
Release files / zeconfig-0.2.3.tar.gz
| Download URL | zeconfig-0.2.3.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49d27b9b01825e4e52519bfdd0a8ab4b588741b5e1974be9e9aefc34b21c6507
|
|
BLAKE2b-256 checksum How to use checksums |
a8e45420afc20757a61bd3cc98c7b468697c4fa42b714f85b50662e702104b3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.18
|
Release files / zeconfig-0.2.3-py3-none-any.whl
| Download URL | zeconfig-0.2.3-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2ca3e63c2873094f8a59d0b188ee42ff675541562fa649c8f2514a6201b9241
|
|
BLAKE2b-256 checksum How to use checksums |
f385b1f9746f0e1f19446e9c93dee9e691e69f1e651fd4c241e238e75ad3cd1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.18
|
Security for zeconfig 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.