Metadata-Version: 2.4
Name: bossalabs
Version: 0.1.2
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: boto3
Requires-Dist: requests
Requires-Dist: fire
Requires-Dist: tomli; python_version < "3.11"
Requires-Dist: requests-toolbelt>=1.0.0
Requires-Dist: mypy
Requires-Dist: ruff
Requires-Dist: pytest
Requires-Dist: types-requests
Requires-Dist: tqdm>=4.67.3
Requires-Dist: python-dotenv>=1.2.2

# BossaLabs Python Client

[![PyPI](https://img.shields.io/pypi/v/bossalabs)](https://pypi.org/project/bossalabs/)
[![Python](https://img.shields.io/pypi/pyversions/bossalabs)](https://pypi.org/project/bossalabs/)

Official Python client for the [BossaLabs](https://github.com/computervisionsports/bossa-client) API.

The `Client` class is the main entry point for working with BossaLabs from Python,
including:

- Upload a video for inference
- Run inference on images
- Check remaining credits
- Add credits
- Generate an API key
- Check inference results

## Installation

Requires Python 3.10 or newer.

```bash
pip install bossalabs
```

## Quick example

```python
from bossalabs import Client

client = Client(api_key="YOUR_API_KEY", model="MODEL_NAME")
result = client.upload_video("/path/to/video.mp4")

if result["success"]:
    print(f"Job ID: {result['job_id']}")
else:
    print(f"Upload failed: {result['error']}")
```

## CLI

```bash
bossalabs process-video "/path/to/video.mp4" "MODEL_NAME" --api_key "YOUR_API_KEY"
```

## Features

- **Simple API** — create a `Client`, call `upload_video`, inspect the result.
- **CLI included** — upload videos from the terminal with the `bossalabs` command.
- **Predictable errors** — failures are returned as result dictionaries, not
  uncaught exceptions.

## Documentation

| Guide | Description |
|-------|-------------|
| [Installation](https://github.com/computervisionsports/bossa-client/blob/main/docs/installation.md) | Install the package |
| [Quickstart](https://github.com/computervisionsports/bossa-client/blob/main/docs/quickstart.md) | Upload your first video in minutes |
| [Usage](https://github.com/computervisionsports/bossa-client/blob/main/docs/usage.md) | Python API and CLI workflows |
| [Configuration](https://github.com/computervisionsports/bossa-client/blob/main/docs/configuration.md) | Timeouts, content types, and client options |
| [Examples](https://github.com/computervisionsports/bossa-client/blob/main/docs/examples.md) | Copy-paste recipes for common tasks |
| [API Reference](https://github.com/computervisionsports/bossa-client/blob/main/docs/api/index.md) | Auto-generated docs from docstrings |

## Public API

Import from the top-level `bossalabs` package:

| Symbol | Description |
|--------|-------------|
| `Client` | Authorize and upload video files |
| `bossalabs` CLI | `process-video` command for terminal uploads |

## Contributing

Issues and pull requests are welcome in the
[GitHub repository](https://github.com/computervisionsports/bossa-client).
