Skip to main content

clabe

 ██████╗██╗      █████╗ ██████╗ ███████╗
██╔════╝██║     ██╔══██╗██╔══██╗██╔════╝
██║     ██║     ███████║██████╔╝█████╗  
██║     ██║     ██╔══██║██╔══██╗██╔══╝  
╚██████╗███████╗██║  ██║██████╔╝███████╗
 ╚═════╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚══════╝

Command-line-interface Launcher for AIND Behavior Experiments

Documentation CI PyPI version License

CLABE is a Python toolkit for building, running, and operating behavioral-experiment workflows. It provides a launcher for experiment scripts alongside composable utilities for user interaction, external applications, configuration and storage, resource checks, data transfer, remote execution, logging, and repository-state capture.

The library is designed to be useful both in an interactive experiment session and in scripted or remote workflows.

Install

For a project managed with uv:

uv add aind-clabe

Or install with pip:

pip install aind-clabe

To work on this repository locally:

git clone https://github.com/AllenNeuralDynamics/clabe.git
cd clabe
uv sync

What CLABE provides

  • Experiment launcher — discover and run functions marked with @experiment, with console, TUI, and web-served interaction options.
  • Frontends and forms — collect typed input from Pydantic models, prompt for paths, confirmations, selections, and read-only reviews.
  • Applications and executors — describe external commands once and run them locally, asynchronously, detached, or through XML-RPC.
  • Stores and services — compose local, in-memory, Ficus, and optional Dataverse-backed configuration and data services.
  • Operational helpers — resource constraints, data transfer, structured logging, OpenTelemetry support, and session construction.
  • Repository state — capture a JSON snapshot of a repository and its submodules for dataset or experiment metadata.

Quick start

Define an experiment in a Python module:

from clabe.launcher import Launcher, experiment


@experiment()
async def my_experiment(launcher: Launcher) -> None:
    launcher.frontend.notify("Experiment started")
    # Configure the session, check resources, and run applications here.

Run the module with the CLABE CLI:

uv run clabe run path/to/my_experiment.py

See examples/behavior_launcher.py for a fuller example that combines sessions, forms, stores, resource checks, applications, and telemetry.

Command line

Show available commands and their options:

uv run clabe --help

Run an experiment interactively:

uv run clabe run path/to/my_experiment.py

Serve an experiment's text UI locally:

uv run clabe serve path/to/my_experiment.py --port 8089

Capture Git state for a repository and all declared submodules:

uv run clabe repository-state path/to/repository > repository-state.json

Each repository entry includes its URL, commit SHA, exact and nearest tags, branch, dirty state, name, cwd-relative path, and nested submodules. See examples/repository_state.py for invoking this command through CLABE's executor pattern.

Optional integrations

Some integrations are optional so a basic installation remains lightweight:

uv add "aind-clabe[aind-services]"  # AIND services, data schema, and transfer tooling
uv add "aind-clabe[web]"            # Web-served Textual UI
uv add "aind-clabe[otel]"           # OpenTelemetry exporters and YAML support

Documentation and development

  • Browse the documentation for API references and guides.
  • Run tests with uv run pytest.
  • Check style with uv run ruff check.
  • Build documentation locally with uv run mkdocs serve after installing the docs dependency group.

Contributions are welcome. Please include focused tests for behavior changes and keep the package's cross-platform support in mind.

Release files for aind-clabe 0.13.1

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

Source distribution (sdist)

Source distribution for aind-clabe 0.13.1
File Size Uploaded
aind_clabe-0.13.1.tar.gz 132.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aind-clabe 0.13.1
File Interpreter ABI Platform
aind_clabe-0.13.1-py3-none-any.whl Python 3 none any Details

Total release size: 298.4 kB

Release files / aind_clabe-0.13.1.tar.gz

Download URL aind_clabe-0.13.1.tar.gz
Size 132.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bb9ed543ba64a3c7829c07471092d294ac027c8b3bdb26a25fa03f686636034f
BLAKE2b-256 checksum
How to use checksums
6089e20c6a4ffcdd70b1fe46ff747ef684a4f7d5240b1406209999427d208b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aind_clabe-0.13.1-py3-none-any.whl

Download URL aind_clabe-0.13.1-py3-none-any.whl
Size 166.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd33985f7365b8577a4214567b9595e3377e29472f4a70d5f4debeb9d39e23d4
BLAKE2b-256 checksum
How to use checksums
26236f5c800f5dbce675060e0cb828435ec1feb784182650fd7f1402079a05e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.13.4

2 release files

0.13.3

2 release files

0.13.2

2 release files

This release

0.13.1 This release

2 release files

0.13.0

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.0

2 release files

0.6.14

2 release files

0.6.11

2 release files

0.6.10

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release 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