Catalog PyPI
PACKAGE EXPLORERView in registry

abstraction-config

PyPI

What this machine has been told, and which authority said so. One answer per key, with its provenance.

Versions collected1
Direct dependencies2From release 0.1.0
Last observed20 Oct, 17:41 UTC

README

Version 0.1.0 documentation

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

callwhat 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 save here. A setup step or the Go implementation writes the file.
  • A machine-wide file no administrator owns raises Untrusted rather 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 UNPROVEN throughout.

Apache-2.0. See LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.010 Sept 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
openabstractions/abstraction-config

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:41 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:04aef6933b891fb90db1c6826d7403f910e22336a4ba27280e38b3689fbc40b8