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.1.tar.gz (112.9 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.1-cp38-abi3-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.8+Windows x86-64

holoconf-0.5.1-cp38-abi3-musllinux_1_2_x86_64.whl (2.7 MB view details)

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

holoconf-0.5.1-cp38-abi3-musllinux_1_2_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

holoconf-0.5.1-cp38-abi3-manylinux_2_28_x86_64.whl (2.5 MB view details)

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

holoconf-0.5.1-cp38-abi3-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

holoconf-0.5.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.4 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.1.tar.gz.

File metadata

  • Download URL: holoconf-0.5.1.tar.gz
  • Upload date:
  • Size: 112.9 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.1.tar.gz
Algorithm Hash digest
SHA256 c98d15da6f4b79846063dd6ea83ab1a708bdb36e20619614b4ab7d9932f19e29
MD5 2b172c1e0dad979ddce899689df2ed74
BLAKE2b-256 ecd68dbb4d426a6f1c506ffff3e3528a76dc7cd6d663fad710b2e5a6eab2563e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: holoconf-0.5.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.2 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.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d7a1af7220988deec1e5440da01d17c061b1110a0977a4b9d5788b510d1cdb64
MD5 23d0264c4ac8f95610bd1246d8a3949a
BLAKE2b-256 1a7a9cfb5ad0f97bb0a48e4a4c99f1a208480c28fe13a377918426556d40bdce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 74f38d1d7aca6c692a4c9aee5bbdb47a18423eeabe009bb713d941b5b53c0b1c
MD5 38ddc713942059e548800bfe249ce411
BLAKE2b-256 48f85db82291e07f4a6de9e81096f4a7e56616cf6653f6c6b0452feda5c6a6b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.1-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e4c9878215efefbd8b5d640dee169ae07fe1508074d0fa6a5a79868ffe5ef11b
MD5 f4c02e88004d158d7e45cc2c6f72dfec
BLAKE2b-256 aa23da124ba2d9d7181a11abd4fbcefa59696f8f65dde2b42ac3b00cb16ba01c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.1-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2171e8c6eb42a85238e7cfb6feeb8f8866454c707c7ca635bfb823803ed6dc4c
MD5 3052f6dd6937e2080013e6cdca654d28
BLAKE2b-256 ad565b051cea9181f7e891c8426487015a63d363144183968cabf1844da3b93a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for holoconf-0.5.1-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6e1e3f89397d4c270f7497a686ee3377287648f9ee6e079ffb3ce4dc7d31ca80
MD5 52ad0d64def573fa37270179027fa875
BLAKE2b-256 6aa7d153348d049e4ac9110bd9588155385b180474a235cdc20571891d12bd02

See more details on using hashes here.

Provenance

The following attestation bundles were made for holoconf-0.5.1-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.1-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.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 6fbf8b4a82e2c79b6299652da74a0d34239f965244093b4ed907fefc2e4ee232
MD5 bc700eb34c4023cf23b8b5778ff19a5a
BLAKE2b-256 5936768e6454af44519f84034b06f6015a4fb50b2b17e7b8c51288b0180caaeb

See more details on using hashes here.

Provenance

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