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.4.0.tar.gz (101.0 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.4.0-cp38-abi3-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.8+Windows x86-64

holoconf-0.4.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.4.0-cp38-abi3-musllinux_1_2_aarch64.whl (4.6 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

holoconf-0.4.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.4.0-cp38-abi3-manylinux_2_28_aarch64.whl (4.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

holoconf-0.4.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.4.0.tar.gz.

File metadata

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

File hashes

Hashes for holoconf-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1ce70fa2008cda2cb9453dcca6d01e03cf6938cc08d570142ff575844e7631ab
MD5 db9efa993cf3695c53aa4696986505d0
BLAKE2b-256 3548f610c38a9586051738930c03fc56de0adae6e9750691cfbca71c0d457ed3

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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.4.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: holoconf-0.4.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.4.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 68457dad626060b981eff425f99a2d742018eb51084272ea0b6c87c90dcf05e7
MD5 3e22e6630d5ade781664cadaffacf413
BLAKE2b-256 b5f4dbd36395db66c581ca0a6fb18aafbb2e8738ab62a65630d5889d3eab586e

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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.4.0-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for holoconf-0.4.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 18a6c34415f0be3b272d5afe6448253c6190d4aad915e521f7e2d90003166b3b
MD5 095aa79a975ab9024379f95e318f0a75
BLAKE2b-256 b84463bf1ae61ab2f522ed313f1a5087d07d863864bbe1716d5c6964d8d38b92

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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.4.0-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for holoconf-0.4.0-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a6a9bd16429045379fc195ec3aa172ca702f5a812ab438045c310023723feb0c
MD5 5cce8c8f3ae5d55f49ac39ec9db2323c
BLAKE2b-256 e1dba321db89b7393e04b9d0b20fdbf89de2684dbecc231fc6338f53ed8e97b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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.4.0-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for holoconf-0.4.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b779ce33d9230534cfba55c5e271c15a74f40a944c309e099dfc6fecef2440fe
MD5 4a7f5f23a2a1c5c1210b15193039585a
BLAKE2b-256 e2eb4fcca698c4b35afdb0a6282630d594b14bd4c79775bba2174a4bfb6b661b

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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.4.0-cp38-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for holoconf-0.4.0-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd9d74250021e98d6257d99c94b62ae319a243dbce3b2dbae83d78112d2c3c67
MD5 4551ab41c6ff3b949078e6e3694ac016
BLAKE2b-256 a66b5e3e686fab371b80c828e8e50dbc9ef1dd810353fae05f613ccec6e3d93f

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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.4.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.4.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a9e05b02ab7a586bb8006320c8817fcc6e262736279c0a1b8c954dd2900603fc
MD5 3eebf9b7f6e3b8072597d735b7cd092c
BLAKE2b-256 a328e39b3a23e08b861ad3b3ee3ebd6d47ffffd15d2a811ca8bbe99aae4e503d

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.4.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