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, then open a PR here with the changes.
Releasing
Bump version in pyproject.toml, merge to main, then tag the release:
git tag v0.8.0 && git push origin v0.8.0
The release GitHub Actions workflow builds the package and publishes it to
PyPI via trusted publishing.
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.0.tar.gz.
File metadata
- Download URL: labric-0.8.0.tar.gz
- Upload date:
- Size: 74.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 |
7389c562757dbe8b3e61ca3872cae16377ecb5465a24b3c1897a5f566615e845
|
|
| MD5 |
13daeeb773ee8618beb97cb0a36423b1
|
|
| BLAKE2b-256 |
620a53d7d69b664124fee04d963631a856e015e196f6ba9bad4a5401cfdcba2d
|
Provenance
The following attestation bundles were made for labric-0.8.0.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.0.tar.gz -
Subject digest:
7389c562757dbe8b3e61ca3872cae16377ecb5465a24b3c1897a5f566615e845 - Sigstore transparency entry: 2138790911
- Sigstore integration time:
-
Permalink:
Labric-Platforms/py-sdk@d5148da521860d82946c4468280217fb7047373b -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/Labric-Platforms
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d5148da521860d82946c4468280217fb7047373b -
Trigger Event:
push
-
Statement type:
File details
Details for the file labric-0.8.0-py3-none-any.whl.
File metadata
- Download URL: labric-0.8.0-py3-none-any.whl
- Upload date:
- Size: 73.5 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 |
17a5737745f60bd752c143176fc43358c1b29e3da37a9b4a77a73675aef207ea
|
|
| MD5 |
86e993ae1f66c70b47064f917855e48e
|
|
| BLAKE2b-256 |
d15b25c1f789e2bf944ed498d002ee07fb02e05b5c67743169845ce5d8ed6e17
|
Provenance
The following attestation bundles were made for labric-0.8.0-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.0-py3-none-any.whl -
Subject digest:
17a5737745f60bd752c143176fc43358c1b29e3da37a9b4a77a73675aef207ea - Sigstore transparency entry: 2138790963
- Sigstore integration time:
-
Permalink:
Labric-Platforms/py-sdk@d5148da521860d82946c4468280217fb7047373b -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/Labric-Platforms
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d5148da521860d82946c4468280217fb7047373b -
Trigger Event:
push
-
Statement type: