Skip to main content

pyknf

Merge layered JSON or TOML config files into a dict, using the same Rust engine as the knf CLI.

pip install pyknf  # the `knf` module and the `knf` executable
from knf import accumulate, filter_paths, load

config = load(["base.toml", "prod.toml"])
config = load(["base.toml", "prod.toml"], interpolate=True, shallow="db.*")
config = load(["foo.toml", "bar.toml"], interpolate=True, context="config.toml")

files = accumulate("services/api/prod.toml", base_dir=project_root)
files = filter_paths(files, "{defaults,prod}.toml", filename_only=True)
config = load(files)
  • load merges left to right: objects recurse; arrays, scalars and None replace. All files must share one format. An empty list returns {}.
  • interpolate=True resolves ${key.path} and ${env:NAME} after merging.
  • context="config.toml" supplies one same-format filepath without merging it; requires interpolate=True. Complete paths prefer output, then context, including context dependencies. Only referenced context values resolve.
  • shallow="PATTERN" replaces matching key paths wholesale ("*", "db", "db.*").
  • accumulate collects same-format files along a relative target path, with the target last. filter_paths filters a list by glob without I/O.
  • Errors: knf.ParseError and knf.InterpolationError (both ValueErrors), ValueError for bad arguments, and OSError subclasses for I/O failures.
  • TOML datetimes become datetime, date or time objects.

See the project README for details.

Metadata

Release files for pyknf 0.5.1

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

Built distributions (wheels)

Table of built distributions (wheels) for pyknf 0.5.1
File Actions
pyknf-0.5.1-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details for pyknf-0.5.1-cp39-abi3-win_arm64.whl
pyknf-0.5.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for pyknf-0.5.1-cp39-abi3-win_amd64.whl
pyknf-0.5.1-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for pyknf-0.5.1-cp39-abi3-musllinux_1_2_x86_64.whl
pyknf-0.5.1-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for pyknf-0.5.1-cp39-abi3-musllinux_1_2_aarch64.whl
pyknf-0.5.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for pyknf-0.5.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyknf-0.5.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for pyknf-0.5.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
pyknf-0.5.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for pyknf-0.5.1-cp39-abi3-macosx_11_0_arm64.whl
pyknf-0.5.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for pyknf-0.5.1-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 5.9 MB

Release files / pyknf-0.5.1-cp39-abi3-win_arm64.whl

Download URL pyknf-0.5.1-cp39-abi3-win_arm64.whl
Size 628.2 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
a7c1b927cf4d89ae70e7dc05de9aa670b2d2afbaee266d950ef99cf68012a2c9
BLAKE2b-256 checksum
How to use checksums
241010c76b024f7234f8f1fb55f24ebdfb4e6307590bc5f6e8ab6ddcbf9c8fe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-win_amd64.whl

Download URL pyknf-0.5.1-cp39-abi3-win_amd64.whl
Size 664.6 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f9bf895ac3f928afdb2e04cf2be05a9ad17225a56d75d3a08707efe98a7ba423
BLAKE2b-256 checksum
How to use checksums
bd353166aa65c1c7ca2c31d2a307e0e8c092851add8aeb85d1ee6467e946d064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL pyknf-0.5.1-cp39-abi3-musllinux_1_2_x86_64.whl
Size 956.7 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
eea7b3239a25c23d58c2875d239bc477d9ab29cffdcad3b62366d645084b593d
BLAKE2b-256 checksum
How to use checksums
771c3678074c54f7a61566fa640e7bf3c68f9224eeaf32b453efc05a2a5a073a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL pyknf-0.5.1-cp39-abi3-musllinux_1_2_aarch64.whl
Size 877.6 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
c023b0978fbdab498585dbc6f1e968097c67a4e4ff4e8cbcb8652d405105d8ec
BLAKE2b-256 checksum
How to use checksums
369abd900dbc8394c1f41b5c4a1951f08c26ad877bf6ec69a1878e3950ce248e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyknf-0.5.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 742.4 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c2ee7c2098b402b6afd91dcc69b0b1ac7043f310222b34d988575772e71c398f
BLAKE2b-256 checksum
How to use checksums
fff6552ceb0b3d692760628cf52c11f294498a159e150e184a08f95780edb377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pyknf-0.5.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 698.4 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
92a4f036b9357cd9119524d7758493b37b9f9a0e5b2f35c37160013026fa8fe8
BLAKE2b-256 checksum
How to use checksums
77a8b63171d805d8c6fc10b147f4102158973dccbcf340bf7ed4920913953923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL pyknf-0.5.1-cp39-abi3-macosx_11_0_arm64.whl
Size 673.7 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6f205d5072bdc6f7a1393e7dfe58944905976c0d62e97abccc3b7a048846c233
BLAKE2b-256 checksum
How to use checksums
ca846cbd8d6c05cec4e21f660ad98290f5c01ce52c87fab5b6b8d5d29535253d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyknf-0.5.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pyknf-0.5.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 695.3 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
467330624a8b58753b48db0fe3a14cc4041342c590a658e15c8a82b0d035f1cd
BLAKE2b-256 checksum
How to use checksums
1c7e717fc05bbea5911d99e1003ba4869798d134648912671e9020cdd71b2958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pyknf 0.5.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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