The BioLM Python SDK lets you call BioLM models from Python with minimal setup: encode sequences, predict structures, and generate sequences. The recommended interface is Model; lower-level HTTP clients live in biolm.core.
Quick example
from biolm import Model
model = Model("esm2-8m")
result = model.encode(type="sequence", items="MSILVTRPSPAGEEL")
model = Model("esmfold")
result = model.predict(type="sequence", items=["MDNELE", "MENDEL"])
model = Model("progen2-oas")
result = model.generate(
type="context",
items="M",
params={"temperature": 0.7, "num_samples": 2, "max_length": 17},
)
What you can do
Encode sequences to get embeddings (e.g. ESM2-8M).
Predict protein structures from sequences (e.g. ESMFold).
Generate new sequences from context (e.g. ProGen2-OAS).
Ways to use the SDK
Model inference: Use
Model. See Client interfaces and biolm.models.Protocols, pipelines, platform: See SDK reference.
Sync vs async:
Modelis sync; async apps useBioLMApiClient. See Concurrency.Batching, errors, rate limits, disk output: See Batching and Input Flexibility, Rate Limiting and Throttling, Error Handling.
Advanced / legacy HTTP clients: See biolm.core.
Next steps
biolm.models —
Modelinterface and examples.biolm.core —
biolm(),BioLMApi, andBioLMApiClient.biolm.pipeline — Pipeline config types and
GenerativePipeline.Client interfaces — When to use which client interface.
Frequently Asked Questions — Common questions.