The official Python library for the Labric API
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labric-0.8.4.tar.gz.
File metadata
- Download URL: labric-0.8.4.tar.gz
- Upload date:
- Size: 72.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
797e02d97a3cc95a50ef0287fd4e3e0e8f9be40d0389cb3053d783df93aa4592
|
|
| MD5 |
fd8cc49bafeaa8606d307e1b759626d9
|
|
| BLAKE2b-256 |
11c585841c056ef1020eed95b3cefe4bdc16fa2ae1672e5c0181070c017fcd99
|
Provenance
The following attestation bundles were made for labric-0.8.4.tar.gz:
Publisher:
release.yml on Labric-Platforms/py-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labric-0.8.4.tar.gz -
Subject digest:
797e02d97a3cc95a50ef0287fd4e3e0e8f9be40d0389cb3053d783df93aa4592 - Sigstore transparency entry: 2187706364
- Sigstore integration time:
-
Permalink:
Labric-Platforms/py-sdk@a0ad8eadbf7b50cca556937ade06cb0e8a621775 -
Branch / Tag:
refs/tags/v0.8.4 - Owner: https://github.com/Labric-Platforms
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a0ad8eadbf7b50cca556937ade06cb0e8a621775 -
Trigger Event:
push
-
Statement type:
File details
Details for the file labric-0.8.4-py3-none-any.whl.
File metadata
- Download URL: labric-0.8.4-py3-none-any.whl
- Upload date:
- Size: 67.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
904951a99732c039de4436e9e8552100839366f493223a8e949428514c1e4bb5
|
|
| MD5 |
748296e58c2df80175d535d2d208808a
|
|
| BLAKE2b-256 |
a1750ec5169f37fa8a7697b932a877d9be095e04fc662832d8a217fa610cb20c
|
Provenance
The following attestation bundles were made for labric-0.8.4-py3-none-any.whl:
Publisher:
release.yml on Labric-Platforms/py-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labric-0.8.4-py3-none-any.whl -
Subject digest:
904951a99732c039de4436e9e8552100839366f493223a8e949428514c1e4bb5 - Sigstore transparency entry: 2187706424
- Sigstore integration time:
-
Permalink:
Labric-Platforms/py-sdk@a0ad8eadbf7b50cca556937ade06cb0e8a621775 -
Branch / Tag:
refs/tags/v0.8.4 - Owner: https://github.com/Labric-Platforms
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a0ad8eadbf7b50cca556937ade06cb0e8a621775 -
Trigger Event:
push
-
Statement type: