Python SDK
artano-lemma is the Python distribution of Lemma. It targets the same surface
as the Node MCP server, but lets you read the corpus in-process from a notebook
or script.
Install
pip install artano-lemmaAfter install, a lemma command is on your PATH:
lemma paths # where the corpus + schema resolvelemma list # list every cardlemma show density-of-states # pretty-print one cardUse it from Python
from artano_lemma import load_cards
cards = load_cards()print(f"{len(cards)} cards loaded")
# filter to one domaincondensed = [c for c in cards if (c.domain or "").startswith("physics-condensed-matter")]for c in condensed: print(c.id, c.kind)
# inspect a single cardcard = next(c for c in cards if c.id == "density-of-states")print(card.name)Pointing at a different corpus
By default the SDK reads the bundled corpus. Pass an explicit path (or set
LEMMA_CARDS_DIR) to read a private fork or an unreleased card you are drafting:
from pathlib import Pathfrom artano_lemma import load_cards
cards = load_cards(Path("/path/to/your/cards"))Status
The cards loader and the lemma CLI are usable today. The standalone
cross-check engine in the SDK is still being finished — for production
verification right now, prefer the Node MCP server,
which ships hypothesis_crosscheck. artano-lemma is published as a 0.1.0a0
alpha. Apache-2.0.
The full public API surface — typed card models, the validator, the corpus
loader, the engine, and the MCP client — is documented in the package source
under sdk-py/.