Skip to main content

coffer

Typed config reader for resolved Coffer config files.

Coffer is a Go CLI that merges YAML configs, resolves secrets from GCP Secret Manager, and outputs a resolved config file. This library reads those pre-resolved files and provides ergonomic, type-safe access. No secret resolution, no GCP dependency.

Install

pip install coffer-config

Usage

from coffer import Config

# Load from a resolved config file (JSON or YAML)
config = Config.from_file("config.json")

# Dot-notation access
host = config.get("database.host")
port = config.get("database.port", type=int)
debug = config.get("debug", default=False, type=bool)

# Dict-style access (nested dicts become Config objects)
db = config["database"]
db["host"]  # "localhost"

# Membership and iteration
"database.host" in config  # True
list(config)               # top-level keys

# Raw dict
config.to_dict()

Development

pip install -e ".[dev]"
pre-commit install

Limitations

  • Dot-separated keys: Keys containing literal dots (e.g. {"a.b": 1}) are not accessible via dot-notation. Use config.to_dict() to access them directly.

Type coercion

The type= parameter on get() coerces values:

type= Behavior
int int(value)
float float(value)
bool "true"/"1"/"yes" -> True, "false"/"0"/"no" -> False (case-insensitive)
str str(value)
list If string, splits on , and strips whitespace. Lists pass through.

Metadata

Release files for coffer-config 0.2.0

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

Source distribution (sdist)

Source distribution for coffer-config 0.2.0
File Size Uploaded
coffer_config-0.2.0.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coffer-config 0.2.0
File Interpreter ABI Platform
coffer_config-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / coffer_config-0.2.0.tar.gz

Download URL coffer_config-0.2.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3b9aa2f230572e302465d3cb0e9f6142fb78d361c953377164ec6f9889ceade0
BLAKE2b-256 checksum
How to use checksums
7e2812fe2ca243e0c502635a4999afdefbdbf5cf3649b8e1e2bd6113f1c44043
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / coffer_config-0.2.0-py3-none-any.whl

Download URL coffer_config-0.2.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b94ddd86a133e85bae3f3e1ac7035ae8e35a977ac1ee840fb33fc7b540c5646
BLAKE2b-256 checksum
How to use checksums
3c438eb5907ba2ba0491ea8bc210b5d93ff9869761d0848de6d65f3ad7bb7704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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