Skip to main content

Trailsign

A YAML settings library for resolving secrets and environment variables.

A small, language-independent library for resolving application settings from a declarative, self-describing config — where each value states its own source (a literal, an environment variable, a vault secret, ...) instead of the calling code assuming where to look.

api-key:
  trailsign-resolve: environment-variable
  name: GNEWS_API_KEY

trailsign-resolve: is a reserved, namespaced key — deliberately not a bare word like resolve — so it can never collide with a consuming project's own field names. It dispatches to a pluggable resolver; whatever it resolves to is handed to the consumer as a plain value, with no trace of where it came from left in the shape.

Status

Published on PyPI as of 2026-09-01 (v0.1.0). src/trailsign/ is a real installable package (pyproject.toml, src layout) with a test suite covering the resolve walk, the three built-in resolvers (OracleKeyVaultResolver verified against a real OCI Vault secret — see tools/verify_oracle_vault.py), validate()'s combined-error behavior, and the trailsign-resolve vs. type non-collision regression. MIT licensed (see LICENSE). Public on GitHub; CI runs the test suite on every push/PR, and a GitHub Release triggers an automatic PyPI publish (Trusted Publishing, no stored token). A port to at least one other language is still open, since the design's whole point is being language-independent, not just Python.

Installing it

pip install trailsign

Install for development on this repo: pip install -e ".[test]", then pytest.

Start here

  • docs/architecture.md — the config shape, the resolve/dispatch contract (holds equally for a Go interface, a Rust trait, or a Python typing.Protocol), the resolver reference table, two worked examples with diagrams.
  • src/trailsign/settings.py — the Python reference implementation, matching docs/architecture.md exactly.
  • tests/ — the test suite; tests/conftest.py has a shared fixture config mirroring docs/architecture.md's worked examples.

Design rationale, decision history, and open questions are kept in a private companion repo, not published here — this repo carries what a consumer of the library needs, not the internal deliberation behind it.

Origin

This design started inside a Telegram news-trend bot (Auguring, formerly Argus) while building a settings abstraction so that bot could run standalone as well as on its current cloud deployment. The design turned out to be genuinely content-independent — nothing in it assumes anything bot-specific — so it's being extracted into its own project rather than staying bot-only.

The split that makes this portable

Two jobs, two owners, and only one of them is this library's job:

  1. Resolving a marked value to a plain value — Trailsign's job, and only Trailsign's job. Nothing here knows or cares what the resolved value is for.
  2. Turning a resolved config block into a live object — never Trailsign's job. Each consumer owns its own small factory (a plain name→constructor map) that builds whatever it needs from the already-resolved values this library hands it.

Full reasoning for the split, plus two complete worked examples (a news source's API key from an environment variable, a telemetry backend's credential from a vault) with diagrams, is in docs/architecture.md.

What's not decided yet

  • A non-instance-principal auth shape for oracleKeyVault (today it only works from inside an OCI compute instance)
  • Validation-timing default (eager vs. lazy)
  • A port to a second language

Metadata

Release files for trailsign 0.2.1

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

Source distribution (sdist)

Source distribution for trailsign 0.2.1
File Size Uploaded
trailsign-0.2.1.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trailsign 0.2.1
File Interpreter ABI Platform
trailsign-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / trailsign-0.2.1.tar.gz

Download URL trailsign-0.2.1.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
68962ad1530a1b3929b8c2817dd03f1b11a1a84bf47ec9beaab76cf5f227bf52
BLAKE2b-256 checksum
How to use checksums
de523ac12915602533afaa796f1dad531473d446716ad1e056af7701db488099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 4, 2026.

Transparency log

Release files / trailsign-0.2.1-py3-none-any.whl

Download URL trailsign-0.2.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc8dbcb31db09a43eb46b7387b09cd68a237354ee9160c81037d35cbfd14bcd7
BLAKE2b-256 checksum
How to use checksums
71144091f2c743400695d0cd5388bd351f4d1725505320ee61d680858762bf6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

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