Skip to main content

Labric Python SDK

The official Python library for the Labric API.

Installation

pip install labric

Usage

from labric import Labric

client = Labric()  # reads LABRIC_API_KEY from the environment
# or pass the API key explicitly: Labric(api_key="lbk_...")
# requests go to https://platform.labric.co by default; override with
# Labric(base_url="http://localhost:3000")

client.tools.write(
    target_name="samples",
    target_type="table",
    data=[{"sample_id": "S-001", "status": "received"}],
    mode="create",
)

An async client is also available:

from labric import AsyncLabric

See src/labric/reference.md for the full API reference.

Development

The code in src/labric/ is generated by Fern from the Labric OpenAPI spec — do not edit it by hand. The spec and Fern configuration live in the labric-web repository under sdk/; run make python-sdk there to regenerate the output into this repo. For local iteration only — released versions are regenerated in CI (see below).

Releasing

Releases are automated by the sync-python-sdk workflow in labric-web: when the OpenAPI spec or Fern config changes on its main, the workflow regenerates this repo, runs the tests, bumps the version, and pushes a v* tag. The tag triggers the release workflow here, which pauses for approval on the pypi environment — approve the deployment in the Actions tab to publish to PyPI via trusted publishing.

The bump defaults to patch. For a breaking change, include [bump:minor] (or [bump:major]) in the labric-web merge commit message, or run the workflow manually with the bump input.

To release manually (SDK-only fixes like README or packaging changes): bump version in pyproject.toml, merge to main, then tag:

git tag vX.Y.Z && git push origin vX.Y.Z

Download files

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

Source Distribution

labric-0.8.14.tar.gz (82.1 kB view details)

Uploaded Source

Built Distribution

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

labric-0.8.14-py3-none-any.whl (82.6 kB view details)

Uploaded Python 3

File details

Details for the file labric-0.8.14.tar.gz.

File metadata

  • Download URL: labric-0.8.14.tar.gz
  • Upload date:
  • Size: 82.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for labric-0.8.14.tar.gz
Algorithm Hash digest
SHA256 7ca4d50589770a82052e46d5631989283e5e589507852926b5ba868a02f61d1b
MD5 f004ad66440fb4c6656e1e50d52d861e
BLAKE2b-256 205d82b8f41549243afdf4be62a9ff8547ac855c884fd10f4c0b80f9424307ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for labric-0.8.14.tar.gz:

Publisher: release.yml on Labric-Platforms/py-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file labric-0.8.14-py3-none-any.whl.

File metadata

  • Download URL: labric-0.8.14-py3-none-any.whl
  • Upload date:
  • Size: 82.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for labric-0.8.14-py3-none-any.whl
Algorithm Hash digest
SHA256 88b857d2622b9cbc411273bdf63fd83adf0ba4d3a049b922a7f78a49bebedc39
MD5 35a78f22dc6bd02320b08a53b308b398
BLAKE2b-256 e70c9cd460a81838861be34e72500c9a022d19c58843bda23189d81ba0d2dde8

See more details on using hashes here.

Provenance

The following attestation bundles were made for labric-0.8.14-py3-none-any.whl:

Publisher: release.yml on Labric-Platforms/py-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.12.8

2 files

0.12.7

2 files

0.12.6

2 files

0.12.5

2 files

0.12.4

2 files

0.12.3

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.4

2 files

0.10.1

2 files

0.10.0

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.17

2 files

0.8.16

2 files

0.8.15

2 files

This release

0.8.14 This release

2 files

0.8.13

2 files

0.8.12

2 files

0.8.10

2 files

0.8.5

2 files

0.8.4

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

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