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.5.0.tar.gz (112.7 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.5.0-cp38-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

holoconf-0.5.0-cp38-abi3-musllinux_1_2_x86_64.whl (5.0 MB view details)

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

holoconf-0.5.0-cp38-abi3-musllinux_1_2_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

holoconf-0.5.0-cp38-abi3-manylinux_2_28_x86_64.whl (4.7 MB view details)

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

holoconf-0.5.0-cp38-abi3-manylinux_2_28_aarch64.whl (4.7 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

holoconf-0.5.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (8.6 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.5.0.tar.gz.

File metadata

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

File hashes

Hashes for holoconf-0.5.0.tar.gz
Algorithm Hash digest
SHA256 88f00fedd1ab493109a27684179f06c6014dda7be1b50348fabdd37cbf82668e
MD5 94b21a92b61c4217c3d212f394533c31
BLAKE2b-256 b9385544ba5ee80e7dd33055d1bed46598566a356fb3f5c62915c73687e011c7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: holoconf-0.5.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.1 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.5.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b7acb61bb37afa7fb5f76f6b9605421280d4a8b320de26cf75f2d29cdda85029
MD5 f83c624e63392f185dd9473158696cd2
BLAKE2b-256 6616162218416f9048f21b5bb8783307b2bd86420454dacbb9dafba3f899ccdc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 527bb60d39f81836b03fde930d6f9461ef1147add745afac21eb5955b92e0837
MD5 4237dc7698adb6c9f22203996fd14327
BLAKE2b-256 5c203d01ca6903a52a47485079eeea29cb57294d9d96b77260df01089e18ac14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.0-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d016cea850090ebde691717aa80cef72873119653054cecb91246ef14a10931b
MD5 0376009a74aa80cf92fb5407f7571a1c
BLAKE2b-256 1d5e88c75cafe0dbf06f69a4a85cddb8336e1da7165e391e55f0fa27c6406272

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 64250754050617e0d7a9d55f8d7f741e7fc90c6db63d247ad4430fdaff03f10f
MD5 e06f4039f718c02e5d24b90e55aa2e4b
BLAKE2b-256 68fca5e818b9c573a2a77404750de6a2d6a6098e8c0fe45cbf4f46bde629714d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.0-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4d0b73739dc220cf06f83c6f05469fe8f9bea69fce9a30cd7367721507614de5
MD5 243e8e972c9b9888f0ded81b01de1355
BLAKE2b-256 7927a2c0394fdb661eca1cac56d3b8d671cc7950974c175623ceb1e2e7210665

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.5.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.5.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.5.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d88fd4b9fb170c840a4470c514e36be874775c986ef321ae9f8e483ecfdd8999
MD5 6f4d4bd822131c727c02e6161c491f50
BLAKE2b-256 5e1ab99927ee502a7f869a80aab3e8d6f71da1d3bd2765bb8938d7c0e2b4d8c7

See more details on using hashes here.

Provenance

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