Skip to main content

summa-mal Python bindings

PyO3 bindings for the Summa Model Architecture Language (MAL) parser.

The repository directory and Rust extension crate are named summa-mal-python; the published Python distribution remains summa-mal and its import module remains summa_mal.

This wheel is a thin wrapper around the Rust summa-mal crate — the single source of truth for parsing .mal model definitions. It exposes one function:

from summa_mal import parse_mal

json_str = parse_mal(source)  # -> str (serde JSON of ModelDef)

The returned compact JSON represents the same ModelDef as summa-llm export (which writes pretty-printed JSON) and can be consumed by any serde-compatible tool. Syntax errors, unknown keys, and undefined references raise ValueError.

Development

From this directory, build and install the extension in the active virtual environment, then smoke-test the import:

maturin develop
python -c 'from pathlib import Path; from summa_mal import parse_mal; print(parse_mal(Path("../summa-mal/well-known/tiny.mal").read_text()))'

The Rust seam has a fast workspace test:

cargo test -p summa-mal-python

Metadata

Release files for summa-mal 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for summa-mal 2.0.3
File Size Uploaded Provenance Actions
summa_mal-2.0.3.tar.gz 78.6 kB Without provenance Details for summa_mal-2.0.3.tar.gz

Release files / summa_mal-2.0.3.tar.gz

Download URL summa_mal-2.0.3.tar.gz
Size 78.6 kB
Tags Source
SHA-256 checksum
How to use checksums
63059a3150de2eaa048c0780c58e6cd077ea4306ea5e8b1b30e27b6b375df202
BLAKE2b-256 checksum
How to use checksums
a82c9f31039fd139191e63bd77d09ff9ce2ec74c68423391e8311f4a975f3166
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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 summa-mal 2.0.3

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