Skip to main content

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


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.0.tar.gz (74.6 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.0-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

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

Hashes for labric-0.8.0.tar.gz
Algorithm Hash digest
SHA256 7389c562757dbe8b3e61ca3872cae16377ecb5465a24b3c1897a5f566615e845
MD5 13daeeb773ee8618beb97cb0a36423b1
BLAKE2b-256 620a53d7d69b664124fee04d963631a856e015e196f6ba9bad4a5401cfdcba2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for labric-0.8.0.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.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

Hashes for labric-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17a5737745f60bd752c143176fc43358c1b29e3da37a9b4a77a73675aef207ea
MD5 86e993ae1f66c70b47064f917855e48e
BLAKE2b-256 d15b25c1f789e2bf944ed498d002ee07fb02e05b5c67743169845ce5d8ed6e17

See more details on using hashes here.

Provenance

The following attestation bundles were made for labric-0.8.0-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page