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.1.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.1.3
File Size Uploaded Provenance Actions
summa_mal-2.1.3.tar.gz 78.6 kB Without provenance Details for summa_mal-2.1.3.tar.gz

Release files / summa_mal-2.1.3.tar.gz

Download URL summa_mal-2.1.3.tar.gz
Size 78.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ddefd1b721ad09e092db01880766fd817132f252f5e36b2baefc69b63b40c4c9
BLAKE2b-256 checksum
How to use checksums
42727cf5bb12e648502f01895aa1039cf798f88e2e4fac48c9178a82ffde5edd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.1.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