Metadata-Version: 2.4
Name: labric
Version: 0.8.0
Summary: The official Python library for the Labric API
Project-URL: Homepage, https://platform.labric.co
Project-URL: Repository, https://github.com/Labric-Platforms/py-sdk
Author: Labric
License-Expression: MIT
Requires-Python: >=3.9
Requires-Dist: httpx>=0.21.2
Requires-Dist: pydantic>=1.9.2
Requires-Dist: typing-extensions>=4.0.0
Description-Content-Type: text/markdown

# Labric Python SDK

The official Python library for the [Labric](https://platform.labric.co) API.

## Installation

```bash
pip install labric
```

## Usage

```python
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:

```python
from labric import AsyncLabric
```

See [`src/labric/reference.md`](src/labric/reference.md) for the full API reference.

## Development

The code in `src/labric/` is generated by [Fern](https://buildwithfern.com) 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:

```bash
git tag v0.8.0 && git push origin v0.8.0
```

The `release` GitHub Actions workflow builds the package and publishes it to
[PyPI](https://pypi.org/project/labric/) via trusted publishing.
