Skip to main content

spine

Minimal runtime coordination layer for Python projects.

One registry. One freeze. One place where reality gets decided.

This README is for humans browsing GitHub. The complete technical reference lives as inline comments at the top of each .py file — that's where AI assistants should look. Open core.py or observers.py and read the comment block before the imports.

The problem

Every Python project past ~5 files ends up with the same mess. File A imports a path from file B, file C hardcodes a different path, file D assumes the working directory, file E does its own config loading, and file F has no idea what file E decided. Nothing agrees on where things are, how things are loaded, or what things are called.

The fix

A single coordination layer every file reads from. Two rules: before boot, register capabilities. After boot, registry is frozen and read-only for the entire run. No dependency injection. No plugin forest. No abstract factories.

Install

pip install maelspine

Quick start

from spine import Core

c = Core()
c.register("paths.data", Path("./data").resolve())
c.register("paths.logs", Path("./logs").resolve())
c.register("db.backend", SQLiteBackend())
c.boot(env="dev")

data_dir = c.get("paths.data")    # always the same answer
backend  = c.get("db.backend")    # always the same instance
run_id   = c.context.run_id       # unique per run

After boot(), calling register() raises CoreFrozen. That's the entire point.

Full documentation

Open core.py. The first 160 lines are a complete reference — API, design decisions, error types, hit counter usage, file layout, and future split strategy. All as comments. You can't miss it.

Observer (fully detachable)

observers.py watches the core's hit counter and error diagnostics, then sends formatted messages through pluggable backends (Slack, WhatsApp, stdout, custom callbacks). The core has zero knowledge it exists. Delete the file and nothing breaks.

Open observers.py for its full inline documentation.

File layout

spine/
├── __init__.py      re-exports (the stable contract)
├── core.py          Core, RunContext, errors, test harness
└── observers.py     detachable: Observer + backends

License

MIT

Metadata

Release files for maelspine 0.3.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 maelspine 0.3.0
File Size Uploaded Provenance Actions
maelspine-0.3.0.tar.gz 22.3 kB Without provenance Details for maelspine-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 42.8 kB

Release files / maelspine-0.3.0.tar.gz

Download URL maelspine-0.3.0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
08f97e25452a850dd4b83a1eb4d77c8e58ccc38d84ac6658b42b0faa81f2d082
BLAKE2b-256 checksum
How to use checksums
3b24c2a9c8bf1dc5c39c97f182249149be215e24987c8ac41b1e51b7aa5305d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / maelspine-0.3.0-py3-none-any.whl

Download URL maelspine-0.3.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dca5accfafa9bbdb7261edab64e778469603d79afed3f509777a54de174796ee
BLAKE2b-256 checksum
How to use checksums
12054d520666a5e17905565a97abf556ba52ff8dd5e9294bd77114d1130d1750
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for maelspine 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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