Trailsign
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
Python package built out, as of 2026-09-01. 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. Not yet published to PyPI. 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
Not on PyPI yet — until then, install straight from GitHub, ideally pinned to a tag once one exists:
pip install git+https://github.com/nankma/trailsign.git@main
Install for development on this repo: pip install -e ".[test]", then
pytest.
Start here
docs/design.md— the core design: the config shape, the resolve/dispatch contract (holds equally for a Gointerface, a Rusttrait, or a Pythontyping.Protocol), why it's shaped this way, two worked examples with diagrams, and what's still undecided.src/trailsign/settings.py— the Python reference implementation, matchingdocs/design.mdexactly.tests/— the test suite;tests/conftest.pyhas a shared fixture config mirroringdocs/design.md's worked examples.- the
writing-system-design-docsskill (global, not repo-local) — the doc-writing conventiondocs/design.mdfollows, carried over from where this project started in case future design docs here want the same discipline (language-independent contracts, diagrams, a "still open" section that's actually kept honest).
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. docs/design.md's own "Origin" section has the
originating project's actual settings inventory, kept for context on why
the design has the shape it has.
The split that makes this portable
Two jobs, two owners, and only one of them is this library's job:
- 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.
- 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/design.md.
What's not decided yet
See docs/design.md's own "Still open" section for full detail:
- 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trailsign-0.1.0.tar.gz.
File metadata
- Download URL: trailsign-0.1.0.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac901b843101959af78c089700c97c78ca36e5a832ed89de4451d1021887adb1
|
|
| MD5 |
d2d5b917fdda3f99192591732b01f7b6
|
|
| BLAKE2b-256 |
43c746d8c0aea81a68850e487b6294739c68e99ed1b29e783c2e5a1adf50e88a
|
Provenance
The following attestation bundles were made for trailsign-0.1.0.tar.gz:
Publisher:
publish.yml on nankma/trailsign
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trailsign-0.1.0.tar.gz -
Subject digest:
ac901b843101959af78c089700c97c78ca36e5a832ed89de4451d1021887adb1 - Sigstore transparency entry: 2680860879
- Sigstore integration time:
-
Permalink:
nankma/trailsign@60fa0e3caa359b9b4f9205536151168e86d9923b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nankma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@60fa0e3caa359b9b4f9205536151168e86d9923b -
Trigger Event:
release
-
Statement type:
File details
Details for the file trailsign-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trailsign-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1af1ac94c8e437b9d2250db6dc23370d53f3766f9b81bd6a768137bb5531e275
|
|
| MD5 |
950091c009571fd5a63a5917f62eeea6
|
|
| BLAKE2b-256 |
9b02cddcba3a59163b07efd05f2dc0abd7edeb83cd1ee6de32279b09222233c3
|
Provenance
The following attestation bundles were made for trailsign-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on nankma/trailsign
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trailsign-0.1.0-py3-none-any.whl -
Subject digest:
1af1ac94c8e437b9d2250db6dc23370d53f3766f9b81bd6a768137bb5531e275 - Sigstore transparency entry: 2680860998
- Sigstore integration time:
-
Permalink:
nankma/trailsign@60fa0e3caa359b9b4f9205536151168e86d9923b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nankma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@60fa0e3caa359b9b4f9205536151168e86d9923b -
Trigger Event:
release
-
Statement type: