Skip to main content

Cross-language configuration library with resolver support

Project description

holoconf

PyPI Python License: MIT

A Python configuration library with hierarchical merging, interpolation, and schema validation. Built on a high-performance Rust core.

Installation

pip install holoconf

Quick Start

from holoconf import Config

# Load from YAML string
config = Config.loads("""
database:
  host: ${env:DB_HOST,localhost}
  port: 5432
  url: postgresql://${.host}:${.port}/mydb
""")

# Access values with type coercion
print(config.get("database.host"))      # Uses DB_HOST env var or "localhost"
print(config.get_int("database.port"))  # 5432
print(config.get("database.url"))       # Resolves self-references

# Load from file
config = Config.load("config.yaml")

# Merge multiple configs (later files override earlier)
config = Config.load("base.yaml", "override.yaml")

# Export resolved configuration
print(config.to_yaml())
print(config.to_json())

Features

  • Environment variables: ${env:VAR} or ${env:VAR,default}
  • Self-references: ${path.to.value} or ${.sibling} for relative paths
  • File includes: ${file:./other.yaml}
  • Type coercion: get_int(), get_bool(), get_float(), get_list(), get_dict()
  • Lazy resolution: Values resolved on access, cached for efficiency
  • Schema validation: Validate against JSON Schema
  • Escape sequences: \${literal} for literal ${

Interpolation Syntax

Syntax Description Example
${env:VAR} Environment variable ${env:HOME}
${env:VAR,default} Env var with default ${env:PORT,8080}
${path.to.value} Self-reference ${database.host}
${.sibling} Relative reference ${.port}
${file:path} Include file ${file:./secrets.yaml}
\${literal} Escape (literal ${) \${not_interpolated}

CLI

holoconf includes a command-line interface:

# Get a configuration value
holoconf get database.host --config config.yaml

# Dump resolved configuration
holoconf dump --config config.yaml --format json

Documentation

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

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

holoconf-0.3.0.tar.gz (96.3 kB view details)

Uploaded Source

Built Distributions

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

holoconf-0.3.0-cp38-abi3-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.8+Windows x86-64

holoconf-0.3.0-cp38-abi3-musllinux_1_2_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

holoconf-0.3.0-cp38-abi3-musllinux_1_2_aarch64.whl (4.6 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

holoconf-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ x86-64

holoconf-0.3.0-cp38-abi3-manylinux_2_28_aarch64.whl (4.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

holoconf-0.3.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (8.1 MB view details)

Uploaded CPython 3.8+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file holoconf-0.3.0.tar.gz.

File metadata

  • Download URL: holoconf-0.3.0.tar.gz
  • Upload date:
  • Size: 96.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for holoconf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b84b17c9309bb744258bf48258e1e80a3a84bfa282b4d7632387534019c6531b
MD5 c4718e89c52875b2371646320444c3be
BLAKE2b-256 2d87d23573cf106849fee2d4ec7b350e8e66adff7067c2e19661a9ceeafe40db

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0.tar.gz:

Publisher: release.yml on rfestag/holoconf

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

File details

Details for the file holoconf-0.3.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: holoconf-0.3.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for holoconf-0.3.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 17e2571704238e53c986ed7d47b6a174777f18386e24d20f3cb1dbbcdec12566
MD5 5a633d407e618b4c1e7a03ac7c1845d7
BLAKE2b-256 3d8d3fcc239b47fd3a6af4b5db6f11ff7b421944af68acc51b31fe9742bab695

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0-cp38-abi3-win_amd64.whl:

Publisher: release.yml on rfestag/holoconf

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

File details

Details for the file holoconf-0.3.0-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for holoconf-0.3.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ea82a6f35fb9507994a3c94e004e0ecfdf745d810fe6ff3679b18fee1b6da5bf
MD5 2a07f5aa94aca2a3168b7bed92519e77
BLAKE2b-256 8ed72df6224544a450aeb6fe49a55ea18328d6fa9e7899c96b75fc7f5563a236

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0-cp38-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on rfestag/holoconf

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

File details

Details for the file holoconf-0.3.0-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for holoconf-0.3.0-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c25ae67b86ec840cec12e9e7da45fbb8404fb74e2debf83eddbb401f1a6f3500
MD5 b3b9dfc88b45972fabd50e14d80497a0
BLAKE2b-256 9f7a0a57693c68696f049e5e51206d8e4beb1ef0c0be1f6a5087c754f3a0f6bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0-cp38-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on rfestag/holoconf

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

File details

Details for the file holoconf-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for holoconf-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53672b536134a26b4765fdfce081b181bfb7855630f3a43f7c78e2e4fc6ff44f
MD5 4ee416356388e7c04be7364b8ad76d2a
BLAKE2b-256 161fe5f27bc990daf4261bc4c23c1fe12c7dcd53eda0a827a6b907957eb69d3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on rfestag/holoconf

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

File details

Details for the file holoconf-0.3.0-cp38-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for holoconf-0.3.0-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0560e999d2d5932e2ec0a56e3b2ba9f606934bf9ab85ba5672e7e4f0acea3a29
MD5 d4d53fc7d57db1d6b44b82e661371f70
BLAKE2b-256 9c6fcc4697dacb7f4d5dffee1b7daaa0e8d84626daa6e8c202c99a33fb862abf

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0-cp38-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on rfestag/holoconf

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

File details

Details for the file holoconf-0.3.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for holoconf-0.3.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 33d8619505abd80f95d202e8c32df1af69b0e696e2e4ebfd9ad7810a5abe8a2e
MD5 cefb625b3d839d6cbd665702d92c2249
BLAKE2b-256 43c61d5d8283d8f5033fe04824a3c7b65274631a69c273d8d45ea94101785d5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.3.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on rfestag/holoconf

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