Skip to main content

lmcc — the calling convention for calling a model

When a program calls a function in another language, a calling convention says where each argument goes, how the result comes back, and how each type crosses. A model is another language; lmcc is its calling convention. It lays out each call as an lm15 request and reads each reply back into typed values. It never touches the network.

import lmcc

@lmcc.fn
def answer(question: str) -> str:
    """Answer the question in one sentence."""

xml = lmcc.adapter(messages=[
    lmcc.system("{instruction}\n{% for f in outputs %}<{f.name}>\n{f.value}\n</{f.name}>\n{% endfor %}"),
    lmcc.user("{question}"),
])
plan = answer.bind(xml)
request = plan.render(question="Why is the sky blue?").request("gpt-4.1-mini")   # an lm15 request
plan.read("<Answer>\nRayleigh scattering.\n</Answer>").values   # {'answer': ...}, misspelling repaired and reported

pip install "lmcc[lm15]" adds the typed bridge to lm15 (lmcc_lm15). The tutorial, how-to guides, the normative specification and the conformance corpus are in the repository: https://github.com/MaximeRivest/lmcc

Metadata

Release files for lmcc 0.8.8

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

Source distribution (sdist)

Source distribution for lmcc 0.8.8
File Size Uploaded Provenance Actions
lmcc-0.8.8.tar.gz 154.2 kB With provenance Details for lmcc-0.8.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lmcc 0.8.8
File Interpreter ABI Platform Actions
lmcc-0.8.8-py3-none-any.whl Python 3 none any Details for lmcc-0.8.8-py3-none-any.whl

Total release size: 270.1 kB

Release files / lmcc-0.8.8.tar.gz

Download URL lmcc-0.8.8.tar.gz
Size 154.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f606849062668bc9f10b53e3819f9422ff228bdf7ee09a9c36c7dd16fb549f62
BLAKE2b-256 checksum
How to use checksums
47eaac596cc72c7aa1334927042c04466e45ee670ca6377d1f1fa19506660763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 2, 2026.

Transparency log

Release files / lmcc-0.8.8-py3-none-any.whl

Download URL lmcc-0.8.8-py3-none-any.whl
Size 115.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
881665076596ebe10693ced51a7e993f4289981bb24d9dbbd3c8e079a99c5a44
BLAKE2b-256 checksum
How to use checksums
eb1fb2027dc268829743167b2cd7f5d07ac053df6bd1df5dc894122e4f73decf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 2, 2026.

Transparency log

Security for lmcc 0.8.8

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lmcc-0.8.8.tar.gz

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 2, 2026.

Transparency log

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