Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Getting Started

essex-config is a Python library for creating configuration objects that read from various sources, including files, environment variables, and Azure Key Vault.

pip install essex-config

Basic Usage

Create a configuration object for connecting to a customer database:

from pydantic import BaseModel, Field
from essex_config import load_config

class CustomerDatabase(BaseModel):
    """Configuration for connecting to the Customer Database"""
    host: str = Field(default="127.0.0.1", description="DB connection host")
    port: int = Field(description="DB connection port")
    password: str = Field(description="DB connection password")

if __name__ == "__main__":
    config = load_config(CustomerDatabase)
    print(config)

When load_config(CustomerDatabase) is executed, values are populated from environment variables or default values.

Nested Configurations

Nest configuration objects:

class Inner(BaseModel):
    inner_hello: str

class NestedConfiguration(BaseModel):
    hello: str
    nested: Inner

nested_config = load_config(NestedConfiguration)

load_config() populates every field, including nested_config.nested.inner_hello. The default prefix for every field in Inner is nested, which can be changed with Annotated[Inner, Prefixed("new_prefix")].

Metadata

Release files for essex-config 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for essex-config 0.0.6
File Size Uploaded
essex_config-0.0.6.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for essex-config 0.0.6
File Interpreter ABI Platform
essex_config-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 37.9 kB

Release files / essex_config-0.0.6.tar.gz

Download URL essex_config-0.0.6.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cd8b1859cbb2628a93af16b8edb297f7a608aba53a9a05d776b4834e2f484ded
BLAKE2b-256 checksum
How to use checksums
c81b1776b4950fb21b10e3112adce8deef433f20fc1d5c72545884bef90adefb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2025.

Transparency log

Release files / essex_config-0.0.6-py3-none-any.whl

Download URL essex_config-0.0.6-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ad1be9e989f2e3f2582079d0232bb9d4ba3cf0d216cb8e0062f243c49a1f0a4
BLAKE2b-256 checksum
How to use checksums
3a510dfa69971d0f71da4be70e644ca855b3e83334dc6775816db455f7b714c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2025.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page