Supported Python API surface
This is the list of supported public imports from the biosimulant package.
Names not listed here are implementation details and may change without notice.
The compatibility biosim import path exposes the same runtime APIs for existing
projects.
Core composition
from biosimulant import (
BioWorld, WorldEvent,
BioModule, ExecutionContext, ExecutionPolicy,
SignalEmitterBioModule, StatefulBioModule,
WiringBuilder, build_from_spec, load_wiring, load_wiring_toml,
load_wiring_yaml,
)Use BioWorld, BioModule, and WiringBuilder for their contracts.
Signals and visuals
from biosimulant import (
BioSignal, AcceptedSignalProfile, ScalarSignal, ArraySignal,
RecordSignal, EventSignal, InputValueType, SignalSpec,
unwrap_payload, coerce_float, scalar_or_record_input, make_signal,
validate_connection_specs, validate_port_spec_direction,
VisualSpec, validate_visual_spec, normalize_visuals,
)See BioSignal & Metadata and the Visualization Contract.
Lab packaging
from biosimulant import (
build_package, export_lab_package, fetch_package, publish_package,
run_package, unpack_package, validate_package,
)For supported CLI workflows and archive layout, see the lab manifest reference and CLI reference.
Hub-backed local composition
from biosimulant.hub import (
HubComposition, LOCK_FILE_NAME, dependency_directory,
materialize_vendored_lab,
)HubComposition is intentionally in biosimulant.hub, rather than the root
namespace, to make dependency resolution an explicit choice. See the
HubComposition API.
Runtime helpers (provisional)
from biosimulant.runtime import (
FlattenedLab, LabTree, LabTreeChild, LabTreeIO, LabTreeModel,
LabTreePort, LabTreeWire,
coerce_typed_inputs, extract_communication_step, extract_settle_steps,
flatten_lab_tree, flush_package_cache, lab_io_from_mapping,
load_entrypoint,
)biosimulant.runtime holds the package interpretation helpers the CLI uses:
entrypoint loading, typed input coercion, communication-step resolution, and lab
flattening. It is public but provisional, so these names may still change
between minor releases.
Optional simulator bases
from biosimulant.contrib.sbml import TelluriumSBMLBioModule
from biosimulant.contrib.cellml import LibCellMLBioModuleImport the contrib module you need directly. Both bases import their simulator
lazily. The CellML base needs pip install "biosimulant[cellml]". No extra
installs Tellurium, so add it to the model’s own dependencies. See
Wrap an External Simulator.
Managed Developer API
from biosimulant import (
Client, AsyncClient, Run, RunResult, Artifact,
ApiError, AuthenticationError, ValidationError, RateLimitError,
InsufficientCreditsError, RunFailed, RunTimeout,
verify_webhook_signature,
)Client and AsyncClient submit accessible versioned Hub Labs to managed
infrastructure; they do not change local BioWorld.run() behavior. See the
Developer API, runs and results,
and errors reference.
Optional machine-learning helper
from biosimulant import OnnxClassifierModuleThis helper is imported lazily and requires the optional ML dependencies:
pip install "biosimulant[ml]"Version
from biosimulant import __version__