ALX Protocol Python Reference Implementation
The Python implementation provides ALX core protocol behavior for Python, AI, and data workflows.
It is a peer reference implementation. It does not define protocol truth. Protocol truth is defined by protocol/spec.md, protocol/schemas/, test-vectors/, and protocol/error-codes.json.
Capability Status
| Capability | Status |
|---|---|
| Canonicalization | Supported |
| Block creation | Supported |
| Block validation | Supported |
| Content hash derivation | Supported |
| Block hash derivation | Supported |
| Parent lineage validation | Supported |
| Canonical Graph verification | Supported |
| Trace generation | Supported |
| Verification context | Supported |
| Merkle extension helpers | Supported |
| Ed25519 signing | Supported |
| P-256 signing | Supported |
| EIP-712 signing | Not bundled |
EIP-712 is an optional Ethereum-compatible signing suite. It is not required for core protocol conformance.
Install for Development
cd reference-implementations/python
python -m venv .venv
.venv\Scripts\activate
pip install -e ".[dev]"
On macOS or Linux:
source .venv/bin/activate
Run Tests
pytest tests/
Protocol conformance adapter
The Python conformance adapter is:
reference-implementations/python/conformance_adapter.py
From the repository root:
node conformance/bin/run.js --impl "python reference-implementations/python/conformance_adapter.py"
Canonical Graph verification
validate_graph(seed, source, context) verifies the reachable Block Graph and returns one of valid, invalid, incomplete, or resource_limit_reached. The result is scoped to the supplied verification context and exactly follows the canonical Graph verification envelope.
The older two-argument validate_graph(graph, context) adjacency form remains available for compatibility. New integrations should use the canonical three-argument operation.
Package Layout
| Path | Purpose |
|---|---|
src/alx_protocol/block.py |
Block creation and validation |
src/alx_protocol/canonical.py |
Canonicalization |
src/alx_protocol/lineage.py |
Graph and lineage validation |
src/alx_protocol/graph_validation.py |
Canonical finite-source Graph verification |
src/alx_protocol/trace.py |
Attribution Trace generation and verification |
src/alx_protocol/verification_context.py |
Closed-world and open-world validation context |
src/alx_protocol/signatures.py |
Signing model |
src/alx_protocol/ed25519.py |
Ed25519 backend |
src/alx_protocol/p256.py |
P-256 backend |
tests/ |
Python test suite |
Related Documents
Metadata
Release files for alx-protocol 1.0.1
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 |
|---|---|---|---|---|
| alx_protocol-1.0.1.tar.gz | 30.2 kB | Without provenance | Details for alx_protocol-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alx_protocol-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for alx_protocol-1.0.1-py3-none-any.whl |
Total release size: 57.4 kB
Release files / alx_protocol-1.0.1.tar.gz
| Download URL | alx_protocol-1.0.1.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09513ab5e9f19eb53936125f5648aba0272ddbf67b9f9b4ca42c0b84e2a7bce3
|
|
BLAKE2b-256 checksum How to use checksums |
c5dcee6d53e3e76039e0475e35e3ecad54a2f0587b806066ef702a309c51ca29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / alx_protocol-1.0.1-py3-none-any.whl
| Download URL | alx_protocol-1.0.1-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d938c3b443b93ba1aba6b5007a683af001833fe6369719f4d40f32c06420db3
|
|
BLAKE2b-256 checksum How to use checksums |
0a7078f9ab81283ecc118c831030e8c9dc5392da77dda534ae5156c71c5384e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Security for alx-protocol 1.0.1
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.