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.*")

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.
  • 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.0

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.0
File Actions
pyknf-0.5.0-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details for pyknf-0.5.0-cp39-abi3-win_arm64.whl
pyknf-0.5.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for pyknf-0.5.0-cp39-abi3-win_amd64.whl
pyknf-0.5.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for pyknf-0.5.0-cp39-abi3-musllinux_1_2_x86_64.whl
pyknf-0.5.0-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for pyknf-0.5.0-cp39-abi3-musllinux_1_2_aarch64.whl
pyknf-0.5.0-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.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyknf-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for pyknf-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
pyknf-0.5.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for pyknf-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
pyknf-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for pyknf-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 5.9 MB

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

Download URL pyknf-0.5.0-cp39-abi3-win_arm64.whl
Size 628.5 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
8b5fadf3f87309aff5a4d36928eb02589a02c732b5050eb17d375ac29c0111c5
BLAKE2b-256 checksum
How to use checksums
5c0667a285db1e25f47f869e74114a059a7f4d326602f1a0360d377b4a5f5c4f
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.0-cp39-abi3-win_amd64.whl

Download URL pyknf-0.5.0-cp39-abi3-win_amd64.whl
Size 665.4 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7d4b4fc76de24a772a59e63eefdd7bc7ce51627d61b28c0229abb82d5027626d
BLAKE2b-256 checksum
How to use checksums
d8cc7599213ab4ba598c2ffb9f62eff86592e29b90e6e78b92da76318204290b
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.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL pyknf-0.5.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 956.4 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
9f4c5d8956b9c28b6b6f70170eab0517e05725fe3789bdc0ebbbf2e773af5b56
BLAKE2b-256 checksum
How to use checksums
c3ccebb3fef3e2ea9c97076d4aead57855cbcc39cd2fe455becf6354c47b22a1
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.0-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL pyknf-0.5.0-cp39-abi3-musllinux_1_2_aarch64.whl
Size 877.1 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
3a67e3c6b3889de151ba2b02d4091cedc4d25176077cc210dd939c247fdc8344
BLAKE2b-256 checksum
How to use checksums
9dd87a4b00c4724b9d72528273334dfdd1749255bf7fb7997b8af28a255a414e
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.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyknf-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 741.2 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8f5014ee99f6a1f7271af43e3980109e7f821b58716ff4b461e16cb832b17f80
BLAKE2b-256 checksum
How to use checksums
c9d47d5b61a4a5f667855c31d451e8370c6ecaadbc973947e4b205cd2387ed4d
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.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pyknf-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 698.5 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
76d15ee944e068b5087060e63567ecb2f656cffd268f3de5d0f09f85845d9f5f
BLAKE2b-256 checksum
How to use checksums
8218b0994915fed34f52f658c60c3ce76c3d6755a20835f4c519d95d8bdb5e22
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.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL pyknf-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
Size 675.2 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
458dd52b61e2c9214cd1c66a677d3c42d2d4863acc0c03da5a4cf3ec6d825172
BLAKE2b-256 checksum
How to use checksums
e60769994691aac0223822f1a22b74e4e594119679eb7c312418e7f12353cb68
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.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pyknf-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 693.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c4cb8b6d677eaaa460682f93216ef751dda0e959e4150bc6f77322cf4bb87460
BLAKE2b-256 checksum
How to use checksums
20b2f876c90fa6cd99b1720ba357fd331823f0696e29b5ff334988637a56bad4
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.0

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