Skip to main content

Configuration Manager Package

Project description

ZeConfig EN - BR

Buid Tests Release

ZeConfig

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeconfig-0.2.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeconfig-0.2.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file zeconfig-0.2.3.tar.gz.

File metadata

  • Download URL: zeconfig-0.2.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for zeconfig-0.2.3.tar.gz
Algorithm Hash digest
SHA256 49d27b9b01825e4e52519bfdd0a8ab4b588741b5e1974be9e9aefc34b21c6507
MD5 fc9264ce8362251717c62b367e1689c4
BLAKE2b-256 a8e45420afc20757a61bd3cc98c7b468697c4fa42b714f85b50662e702104b3d

See more details on using hashes here.

File details

Details for the file zeconfig-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: zeconfig-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for zeconfig-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ca3e63c2873094f8a59d0b188ee42ff675541562fa649c8f2514a6201b9241
MD5 70bca23cee9600d00ce00767e685692e
BLAKE2b-256 f385b1f9746f0e1f19446e9c93dee9e691e69f1e651fd4c241e238e75ad3cd1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page