abstraction-config, in Python
Where a machine keeps its answer to "which store", and who said so. An administrator's machine-wide file, then this user's file, then the environment for one run — each overriding the last, key by key, with the origin of every answer kept beside it.
An application asks the machine and names no path. A key nothing set is absent, which means this machine does not have that tier: a normal answer, not an error.
This page is the Python package. The Go implementation, the file format and what
is UNPROVEN are on
the repository.
Install
Not on PyPI, and the names on PyPI are not ours. Clone the three repositories beside each other and install them in dependency order:
git clone https://github.com/openabstractions/abstraction-cas
git clone https://github.com/openabstractions/abstraction-watch
git clone https://github.com/openabstractions/abstraction-config
pip install ./abstraction-cas/python ./abstraction-watch/python
pip install ./abstraction-config/python
Python 3.9 or later.
An example that runs
import abstraction_config as config
store, why = config.job_store()
print("jobs live at:", store)
print("because:", why)
print(config.load().describe())
On a machine nobody has configured it prints the default and says so. It reads files and writes none, so running it changes nothing.
What an application calls
| call | what it does |
|---|---|
job_store() |
(path, why) — where jobs live on this machine, and what decided |
load() |
a Config: nas_store, store, log_sink, log_service, off. A file that cannot be read or parsed is skipped, with one line on stderr saying which |
Config.origin(key) |
which authority answered for one key, and which file said so |
Config.describe() |
what was found and where, for a status command |
Config.stamp() |
differs whenever the answer differs, so a long-running process can ask whether anything moved instead of rebuilding |
overridden() |
the keys the environment is deciding, whatever the files say |
user_path() / machine_path() |
the conventional locations on this platform |
watch(budget) |
a subscription that re-reads when the answer changes |
The environment variables that override a file, one per key:
ABSTRACTION_NAS_STORE, ABSTRACTION_STORE, ABSTRACTION_LOG,
ABSTRACTION_LOG_SERVICE.
What may break
- This module reads; it does not write. There is no
savehere. A setup step or the Go implementation writes the file. - A machine-wide file no administrator owns raises
Untrustedrather than being obeyed. Ownership is what is checked, so a file on a filesystem that does not carry it is refused. - No conformance verdict. No scenario in the suite cites this layer yet — what is proven and what is not.
- Not on any package index, and no release carries an API stability promise. Pin a commit you have read.
- Every published transcript was produced on Windows or Linux. macOS is
UNPROVENthroughout.
Apache-2.0. See LICENSE.
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 abstraction_config-0.1.0.tar.gz.
File metadata
- Download URL: abstraction_config-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d6487b3ec03150bfd77197cbc0494641ebcab1c8464fc839ff67acb7ea23c39
|
|
| MD5 |
786ea2541b53310bc6662659eb703caa
|
|
| BLAKE2b-256 |
3f9ee0e194e74bd5f458eaa2c9a62a56bb99c629ed6500d127bd16c2453f3cd9
|
Provenance
The following attestation bundles were made for abstraction_config-0.1.0.tar.gz:
Publisher:
publish.yml on openabstractions/abstraction-config
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abstraction_config-0.1.0.tar.gz -
Subject digest:
4d6487b3ec03150bfd77197cbc0494641ebcab1c8464fc839ff67acb7ea23c39 - Sigstore transparency entry: 2782310005
- Sigstore integration time:
-
Permalink:
openabstractions/abstraction-config@6db884c9ecdf29c56e9a08f6e8fa6b1cdfaaa317 -
Branch / Tag:
refs/tags/python/v0.1.0 - Owner: https://github.com/openabstractions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6db884c9ecdf29c56e9a08f6e8fa6b1cdfaaa317 -
Trigger Event:
push
-
Statement type:
File details
Details for the file abstraction_config-0.1.0-py3-none-any.whl.
File metadata
- Download URL: abstraction_config-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 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 |
fe4cb2a65dd09d296d623102d7c4c9b923024d02ca9a6e55fca13a74b52e2202
|
|
| MD5 |
0bbe3f61f65e9a6bf44841622f5ac494
|
|
| BLAKE2b-256 |
5229e653912a131fe21f6d65f51f15ea19857c37bfa481e26aed1abdab967cb8
|
Provenance
The following attestation bundles were made for abstraction_config-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on openabstractions/abstraction-config
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abstraction_config-0.1.0-py3-none-any.whl -
Subject digest:
fe4cb2a65dd09d296d623102d7c4c9b923024d02ca9a6e55fca13a74b52e2202 - Sigstore transparency entry: 2782310398
- Sigstore integration time:
-
Permalink:
openabstractions/abstraction-config@6db884c9ecdf29c56e9a08f6e8fa6b1cdfaaa317 -
Branch / Tag:
refs/tags/python/v0.1.0 - Owner: https://github.com/openabstractions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6db884c9ecdf29c56e9a08f6e8fa6b1cdfaaa317 -
Trigger Event:
push
-
Statement type: