etassia (Python)
Etassia is a diagram-rendering engine that renders Mermaid-syntax diagram
sources to SVG, and the same source must produce the same SVG in every runtime
that embeds the engine. This package is the Python binding for that engine. It
drives libetassia_ffi, the C application binary interface (ABI) cdylib that
the Ruby binding ships, through Python's built-in ctypes library. The
package contains no second renderer and no reimplementation of any diagram
type: every diagram is rendered by the same native engine the other runtimes
use, and the rendered SVG is byte-identical with the Ruby reference
implementation.
pip install etassia
Each platform wheel vendors the cdylib, which scripts/vendor_engine.sh
compiles from the pinned etassia-rs commit, and the golden-parity suite runs
on every wheel platform at build time (the emulated legs included):
| platform | tag | proof |
|---|---|---|
| Linux x86_64 (glibc) | manylinux_2_35 | full suite, native runner |
| Linux aarch64 (glibc) | manylinux_2_35 | full suite, native arm runner |
| Linux aarch64 (musl) | musllinux_1_2 | full suite, native arm runner |
| Linux i686 (glibc) | manylinux_2_28 | full suite under qemu |
| Linux armv7l (musl) | musllinux_1_2 | full suite under qemu |
| Linux ppc64le | manylinux_2_28 | full suite under qemu |
| Linux s390x | manylinux_2_28 | big-endian; full suite under qemu |
| Linux riscv64 (musl) | musllinux_1_2 | full suite under qemu |
| macOS x86_64 + arm64 | macosx_11_0_universal2 | lipo'd engine; native runners |
| Windows x64 / ARM64 / x86 | win_amd64 / win_arm64 / win32 | full suite, native runner |
This package does not ship an sdist, because the Rust engine sources are a
submodule of this repository and are not part of the source archive, so a
source install could never build or load the engine. For local development, a
locally built library reaches the runtime through the ETASSIA_CDYLIB
environment variable, which the loader tries before the packaged library.
import etassia
svg = etassia.render("flowchart TD\n A[Start] --> B[End]\n")
diagram_type = etassia.detect('pie\n "a": 1\n') # "pie"
etassia.engine_commit() # the pinned etassia-rs commit
etassia.__version__ # this package's version
On rejection, render and detect raise Unported when the engine's error
wire carries the class "Unported", which means the diagram type is recognized
but has no Rust renderer yet, so callers may fall back to another
implementation; sankey-beta sources behave this way. Every other error class
raises RenderError: DiagramTypeError when the source is not a recognized
diagram, and ParseError when the body is rejected for its type. The engine
bakes its parse artifact into the cdylib at compile time; this package loads
no artifact file and verifies no artifact checksum.
Releases
etassia is one product on four runtimes: rs (crates.io +
@etassia/wasm + release binaries), ruby (rubygems), python (PyPI,
this package), and typescript (npm, etassia — the wasm-backed runtime).
Every engine update releases all four together; a release that ships some
runtimes and not the rest is incomplete. This package's version and the
pinned engine commit in src/etassia/etassia-rs-version.txt move together in
one ride commit, and every wheel then vendors the cdylib built from that
exact commit.
Status and honest boundaries (v0.1)
| Capability | State |
|---|---|
| Native render, byte-identical SVG | works — 1183 of the 1206 golden-corpus cases render through the cdylib byte-identically with the Ruby implementation, with zero mismatches |
| Diagram type detection | works — detect returns the corpus type name for every recognized source and reports DiagramTypeError otherwise |
| Unported routing | works — the remaining 23 cases (the error bucket and unrecognized sources routed to unknown) raise Unported, and sankey-beta is declined the same way, matching the ruby binding's native spec |
| Explicit native libraries | works — exclusive library_path, shared NativeContext, ETASSIA_CDYLIB |
| Wheels on PyPI | not yet published — release.yml builds and audits the platform wheels; the trusted-publisher registration is owner-side |
Development
cargo build -p etassia-ffi --release # in etassia-rs
export ETASSIA_CDYLIB=$RS/target/release/libetassia_ffi.dylib
python3 -m pip install -e . pytest
python3 -m pytest tests -q
The tests skip cleanly when no cdylib is reachable and skip the corpus gate
when the golden directory is absent; with the submodule checked out, the
default corpus path (etassia-rs/golden) resolves and the gate runs.
scripts/vendor_engine.sh fetches the engine sources for the pinned commit
from codeload and builds the cdylib into src/etassia/lib/; the wheel build
runs it on every platform, and on macOS it builds both slices and combines
them into one universal2 engine. The corpus grows deliberately as diagram
types land, so its counts in the tests are floors, not pins.
Explicit native libraries
Every public function accepts an optional library_path argument, which is
exclusive: it names the one library to load, and a failure to load it never
falls back to the environment variable, the packaged library, or a system
library. To share one engine between calls, a caller creates
NativeContext(library_path) and passes it as native_context=; each context
binds its own render, detect and free functions, every returned buffer is
freed through the library that produced it, and an explicit path or context
never changes the module's default engine. The default lookup order, used
when neither argument is present, is the ETASSIA_CDYLIB environment
variable, then the packaged library, then the bare system library names.
Metadata
Release files for etassia 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 21.1 MB
Release files / etassia-0.1.0-py3-none-win_arm64.whl
| Download URL | etassia-0.1.0-py3-none-win_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
3558da81a3b727660c5c0613bbbeb6dd0275d1a7fac9ee06311076e4edea4eee
|
|
BLAKE2b-256 checksum How to use checksums |
6c87e0ef75c7f38c64f29c7e65ecfaeaa1d351162e8a790c129b135b1545be35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / etassia-0.1.0-py3-none-win_amd64.whl
| Download URL | etassia-0.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f3e80305bfe4c767937ba3155ca88e1529d3cca35a1862f9cc5e0ab6b2e360d2
|
|
BLAKE2b-256 checksum How to use checksums |
3aafe617c9bdd7d2c552d7f30ae6d9a3649e5e71222144e1c43fc6ebd3b109b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / etassia-0.1.0-py3-none-win32.whl
| Download URL | etassia-0.1.0-py3-none-win32.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
8fb5c5d51cfbcf10dbef436dd4e227895e167ab1782a7073d00266cfefc4c3a0
|
|
BLAKE2b-256 checksum How to use checksums |
32a6d80573dc39d73691ebb4d6eeb59b51c0704a2000b8f0b58e76a439c8b656
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / etassia-0.1.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | etassia-0.1.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
42b1bdcbdd8cddd8433223b6972b86bfb3f82298ff16637dcc27fe50c80225e8
|
|
BLAKE2b-256 checksum How to use checksums |
98259d9e6d25533a9e7684149f2e21bdd148859dccb3ae58ea4abda519e97b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / etassia-0.1.0-py3-none-manylinux_2_35_x86_64.whl
| Download URL | etassia-0.1.0-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
5479aff08f82096794321f85e1ae37ee831e743bca5ffc0b12a8ff5970bd742f
|
|
BLAKE2b-256 checksum How to use checksums |
046c8fe7a8dc214d4cd862c59999c286529f49d521e22ed3f98173473cbe1be1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / etassia-0.1.0-py3-none-manylinux_2_35_aarch64.whl
| Download URL | etassia-0.1.0-py3-none-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Linux glibc 2.35+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
aa935a5db10c29975b0ab8102c63da0998913fc8e4fd20158d2e3050929b0397
|
|
BLAKE2b-256 checksum How to use checksums |
90d347cb9fc46fa3352d3a0280e9d7e30f65c7c5f59c0d9c06cc5baa46d71b5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / etassia-0.1.0-py3-none-macosx_11_0_universal2.whl
| Download URL | etassia-0.1.0-py3-none-macosx_11_0_universal2.whl |
|---|---|
| Size | 5.3 MB |
| Tags | Python 3 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
f9c9488f922f4e82897b78c3f42b369a7a425e95a25c902a1c6e6ca6809aebda
|
|
BLAKE2b-256 checksum How to use checksums |
33788fba86546df770ee30f60b84727ecfe7a161df6616673a60cc4381f3e118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for etassia 0.1.0
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.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for etassia-0.1.0-py3-none-win_arm64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA 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.