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
Release files for summa-mal 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| summa_mal-2.0.0.tar.gz | 78.5 kB | Details |
Release files / summa_mal-2.0.0.tar.gz
| Download URL | summa_mal-2.0.0.tar.gz |
|---|---|
| Size | 78.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c40e893488d0c4686a202ef2df3daeb9e78829934b465cd72db0b6a833be76f0
|
|
BLAKE2b-256 checksum How to use checksums |
a0dc5bb35bda772c38b1da67577f18b49c44a17fecf828dd1cf59c91aaf2cad2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|