Skip to main content

Unified configuration management library for Python

Project description

Proteus

Unified Configuration Management Library for Python

CI codecov Python Versions License

Proteus is a Python library that provides a clean, pattern-based approach to managing application configurations. It allows you to load settings from multiple formats (JSON, YAML, TOML, ENV) and access them through a unified interface, regardless of the source format.


Features

  • Multi-format Support: Load configurations from JSON, YAML, and TOML files seamlessly.
  • Unified Interface: Access all settings through a single, consistent API with dot-notation.
  • Smart Merging: Combine multiple configuration files with intelligent deep-merge.
  • Translation Engine: Convert configuration files between formats programmatically.
  • Thread-Safe: Optional singleton access via ConfigurationManager.instance().
  • Context Manager: Use with ConfigurationManager.temporary() for isolated workspaces.
  • Easily Extensible: Add support for new formats with minimal code.
  • Zero Heavy Dependencies: Only requires pyyaml and python-dotenv.

Quick Start

Installation

Install Proteus directly from PyPI:

pip install proteus-config

Basic Usage

from proteus import ConfigurationManager

config = ConfigurationManager()
config.load("examples/configs/app.yaml")

print(config.get("app_name"))
print(config.get("database.host"))
print(config.get("server.port"))

For a shared application-wide instance, use ConfigurationManager.instance().

For detailed and comprehensive examples covering all formats, see the examples/ directory.


Architecture and Design Patterns

Proteus is built on a foundation of proven design patterns from the Gang of Four catalog:

  • Optional Singleton Pattern: Global point of access to configuration.
  • Context Manager: Isolated temporary workspaces.
  • Facade Pattern: Simplified API over complex orchestration.
  • Factory Method Pattern: Transparent format detection and creator selection.
  • Template Method Pattern: Rigid algorithms for I/O with format-specific hooks.
  • Adapter Pattern: Decoupling from third-party parsing libraries.

For detailed architecture documentation and diagrams, see:


Development and Contributing

If you wish to contribute to the project or understand the development workflow, please refer to our Developer Guide.

Project Structure

proteus/
├── src/proteus/           # Source code
│   ├── core.py            # ConfigurationManager
│   ├── exceptions.py      # Custom exceptions
│   ├── adapters/          # Format adapters
│   ├── formats/           # Creator classes for readers/writers
│   ├── readers/           # Template Method readers
│   └── writers/           # Template Method writers
├── examples/             # Usage examples and configs
└── docs/                 # Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.


Contact

Luca Di Leo


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

proteus_config-1.0.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

proteus_config-1.0.1-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file proteus_config-1.0.1.tar.gz.

File metadata

  • Download URL: proteus_config-1.0.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for proteus_config-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c29ce077386d48dd04786c3deabb234664cbd9a3f4cb5aa9f101f5471a76cce3
MD5 9029bb2af04bb5a41cca7ec7e11064d6
BLAKE2b-256 9e1771fb3ec51821c7ee497e0accce53e9a860c3d9a7cd006f054c7b22a3af96

See more details on using hashes here.

Provenance

The following attestation bundles were made for proteus_config-1.0.1.tar.gz:

Publisher: publish.yml on lucadileo9/proteus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file proteus_config-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: proteus_config-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for proteus_config-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 068bb3fdb46ff49d81ffd29a6e0be5123ac2d48920d1e1399d194bb9f602e325
MD5 a414f040b2ddfc58e6435ac1ac8829ee
BLAKE2b-256 a1de1a4124c2b11e67bb8dcae513bf0bffc210ea2b454e3a339c6e64d132274a

See more details on using hashes here.

Provenance

The following attestation bundles were made for proteus_config-1.0.1-py3-none-any.whl:

Publisher: publish.yml on lucadileo9/proteus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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