This release is a pre-release and may not be stable for production use.
axis-synome
A Python framework for defining and validating financial specifications, with a focus on DeFi primitives and risk calculations. Includes:
- ASC Specifications — Actively Stabilizing Capital entities (assets, tokens, networks, protocols) and formulas (collateral ratios, incentives, resting/latent ASC)
- Spec Validator — Flake8 plugin for enforcing Python subset constraints on spec files
- Metadata & Utilities — Support for spec documentation and validated dataclasses
- SpecRuntime — Pluggable runtime abstraction for opaque operations (linear interpolation, ...) that specs can call without depending on a specific implementation library
Installation
Install from PyPI:
pip install axis-synome
To enable the built-in ReferenceSpecRuntime (numpy-backed), install with the runtime extra:
pip install axis-synome[runtime]
Or install from a private registry:
pip install axis-synome --index-url https://npm.pkg.github.com/archon-research
Usage
ASC Entities
from axis_synome.spec.entities import primes, tokens, networks, protocol_sets
ASC Formulas
from axis_synome.spec.asc.formulas import asc, asc_collateral_ratio, asc_incentive
Opaque Operations in Specs
from axis_synome.spec_support.runtime import math
values = math.linear_interp([1.5], [1.0, 2.0], [10.0, 20.0]) # -> [15.0]
The active runtime is selected once at import time. Resolution order:
AXIS_SYNOME_SPEC_RUNTIME=module.path:ClassNameenv var- A registered
axis_synome.spec_runtimesentry point (declared by a consumer package'spyproject.toml) - The bundled
ReferenceSpecRuntime(requiresaxis-synome[runtime])
If none is available, importing axis_synome.spec_support.runtime.math raises ImportError — the runtime is required at import time, not on first call.
Spec Validation
Specs are validated by two complementary gates:
- Static gate — the
spec_validatorflake8 plugin enforces the declarative Python subset specs are written in (no mutation, no imperative control flow, restricted imports, …). - Semantic gate — the parser (
python -m axis_synome.parser) round-trips every spec module into a SymPy expression graph and identity records. If a spec uses a construct the parser cannot lower, parsing fails — even if it would lint clean. Run viamake parse-specs(also part ofmake check-all).
See ADR-0002 for the rationale behind co-locating the parser with the specs.
from axis_synome.spec_validator import validate_file
validate_file("my_spec.py")
Or use as a flake8 plugin:
flake8 --select=AXS your_spec.py
Examples
Runnable examples that show how to navigate the entity graph (assets,
tokens, networks, protocols of a prime) live under
examples/. Run any of them with:
uv run python examples/02_assets_and_tokens_of_a_prime.py
Highlights:
01_prime_basics.py— basic facts about eachPrimeAgent.02_assets_and_tokens_of_a_prime.py— list assets, tokens, underlying tokens, and group by network/protocol.03_inverse_lookups.py— which primes hold token X?, which primes are on network Y?, which prime owns this address?04_atlas_provenance.py— trace each asset back to its Atlas document.05_feeding_a_formula.py— bridge external records intoPositions and callasc(...).
About
axis-synome is a specification framework for defining financial and risk calculations in DeFi, with emphasis on formalized, auditable spec files.
For more information on writing specifications, see WRITING_SPECS.md.
Requirements
- Python >= 3.11
- pydantic >= 2.0.0
Metadata
Release files for axis-synome 0.2.0.dev202607240944
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| axis_synome-0.2.0.dev202607240944.tar.gz | 336.2 kB | Without provenance | Details for axis_synome-0.2.0.dev202607240944.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| axis_synome-0.2.0.dev202607240944-py3-none-any.whl | Python 3 | none | any | Details for axis_synome-0.2.0.dev202607240944-py3-none-any.whl |
Total release size: 563.3 kB
Release files / axis_synome-0.2.0.dev202607240944.tar.gz
| Download URL | axis_synome-0.2.0.dev202607240944.tar.gz |
|---|---|
| Size | 336.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d757d2125a2c7ab9ca3ec20bafcce42068b85dc267f6967732375b7c807d75c
|
|
BLAKE2b-256 checksum How to use checksums |
c35b41b7ffbd65851fcb5a53f200bf0f889ab00335dee22edc393dfb2086a6ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / axis_synome-0.2.0.dev202607240944-py3-none-any.whl
| Download URL | axis_synome-0.2.0.dev202607240944-py3-none-any.whl |
|---|---|
| Size | 227.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa5c8dd7828530554380c2f772f16e292ebd22534ceefbd34eae8704c1aef593
|
|
BLAKE2b-256 checksum How to use checksums |
5d4a409458200638b7c7592135b3f6aa1210127ae99bf949095db31ffa45d6ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for axis-synome 0.2.0.dev202607240944
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.