Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

lltp-py

Python reference SDK for LLTP (Lab-in-the-Loop Transport Protocol) v0.1.

Primary audience: authors of {provider}-lltp connectors (and similar consumables). Agents and design tools typically talk to those connectors, not this SDK directly — though nothing prevents using the client helpers that way.

Maintained by BioLM during protocol kickoff. See the spec repo GOVERNANCE.md for long-term stewardship intent.

Status: v0.1-alpha. Message signing (sign / verify) is not yet implemented.

Install

pip install lltp

For local development:

pip install -e ".[dev]"

Requires Python >=3.8.

Quick start

from lltp import validate_envelope, derive_order_status
from lltp.client import LLTPClient
import json

with open("tests/fixtures/scenario-a-dna-synthesis/01-order.json") as f:
    order = json.load(f)

validate_envelope(order)
print(derive_order_status(order["requirements"]))  # IN_PROGRESS

Mock provider (Scenario A)

pip install -e .
python scripts/mock_provider.py --port 8765

In another shell:

from lltp.client import LLTPClient
import json

with open("tests/fixtures/scenario-a-dna-synthesis/01-order.json") as f:
    order = json.load(f)

with LLTPClient() as client:
    catalog = client.fetch_catalog("http://127.0.0.1:8765")
    summary = client.submit_order("http://127.0.0.1:8765", order)
    print(summary)

API overview

Module Purpose
lltp.validate validate_envelope, validate_catalog (JSON Schema)
lltp.lifecycle derive_order_status, merge_requirements
lltp.client LLTPClient — HTTP client for provider endpoints
lltp.webhook WebhookHandler — merge STATUS/RESULT deltas

Tests

pip install -e ".[dev]"
pytest

Refreshing vendored schemas and fixtures

When the spec repo changes:

cp ../lltp/schema/0.1/{envelope,provider}.schema.json src/lltp/schemas/
cp ../lltp/examples/catalog/twist.json tests/fixtures/catalog/
cp ../lltp/examples/scenario-a-dna-synthesis/*.json tests/fixtures/scenario-a-dna-synthesis/

Conformance

See CONFORMANCE.md for what this alpha SDK implements vs deferred.

Related repositories

  • lltp — protocol specification
  • BioLM/lltp-js — JavaScript/TypeScript reference SDK
  • {provider}-lltp — provider connectors (separate repos; e.g. twist-lltp) that use this SDK

License

Apache-2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lltp-0.1.0a1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lltp-0.1.0a1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file lltp-0.1.0a1.tar.gz.

File metadata

  • Download URL: lltp-0.1.0a1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for lltp-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 45c78bc3e21cbe15a0c4b70bbf8dd26b65ee13db37d18c8697e2b78f5b201b27
MD5 c6ce01c88f4093492ea609ba98c9531d
BLAKE2b-256 ddfb766f2ffe2d90bba92db8b1c727c964e5862c748ab954d0bb7a8d497e5a99

See more details on using hashes here.

File details

Details for the file lltp-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: lltp-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for lltp-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf120e91ceba6a5db10ff9fa2138bc2bc9fb119dda21147226048f5d749c58b
MD5 9db7d3c569e362b95f9acd7b00212a42
BLAKE2b-256 02721499500b339adf3a201864fbe2d0beb99dbe4ae4e45b6770ca960bb53c75

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 files

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