<!-- Source: https://docs.biosimulant.com/references/library/python-api -->

# Supported Python API surface

This is the exhaustive list of supported public imports from the
`biosimulant` package in 0.0.20. 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

```python
from biosimulant import (
    BioWorld, WorldEvent,
    BioModule, SignalEmitterBioModule, StatefulBioModule,
    WiringBuilder, build_from_spec, load_wiring, load_wiring_toml,
    load_wiring_yaml,
)
```

Use [BioWorld](/references/library/bioworld-api),
[BioModule](/references/library/biomodule-api), and
[WiringBuilder](/references/library/wiring-api) for their contracts.

## Signals and visuals

```python
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](/references/library/signals) and the
[Visualization Contract](/references/library/visualization).

## Lab packaging

```python
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](/references/library/lab-manifest) and
[CLI reference](/references/cli).

## Hub-backed local composition

```python
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](/references/library/hub-composition-api).

## Managed Developer API

```python
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](/developer-api), [Python examples](/developer-api/examples),
and [errors reference](/developer-api/errors).

## Optional machine-learning helper

```python
from biosimulant import OnnxClassifierModule
```

This helper is imported lazily and requires the optional ML dependencies:

```bash
pip install "biosimulant[ml]"
```

## Version

```python
from biosimulant import __version__
```
