Metadata-Version: 2.4
Name: arbi
Version: 0.50.2
Summary: Python client for the ARBI API
License: MIT
Author: Arbitration City Ltd
Author-email: support@arbi.city
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: attrs (>=22.2.0)
Requires-Dist: httpx (>=0.23.0,<0.29.0)
Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
Description-Content-Type: text/markdown

# arbi

Official Python client for the [ARBI](https://arbicity.com) API, auto-generated from the OpenAPI specification.

## Installation

```bash
pip install arbi
```

## Quick start

ARBI uses Ed25519 signature-based authentication. The login endpoint does not require a token — you use the unauthenticated `Client` to log in, then switch to `AuthenticatedClient` with the JWT from the response.

```python
from arbi_client import Client, AuthenticatedClient
from arbi_client.api.user import login_user
from arbi_client.models import LoginRequest

# 1. Log in (no token needed)
with Client(base_url="https://your-instance.arbicity.com") as c:
    response = login_user.sync_detailed(
        client=c,
        body=LoginRequest(
            email="user@example.com",
            signature="<ed25519-signature>",
            timestamp=1700000000,
        ),
    )
    login = response.parsed
    token = login.access_token

# 2. Use the token for authenticated requests
with AuthenticatedClient(base_url="https://your-instance.arbicity.com", token=token) as c:
    # Make authenticated API calls
    ...
```

## Async support

Every endpoint has both sync and async variants:

```python
from arbi_client import AuthenticatedClient
from arbi_client.api.workspace import get_user_workspaces

async with AuthenticatedClient(base_url="https://your-instance.arbicity.com", token=token) as c:
    workspaces = await get_user_workspaces.asyncio(client=c)
```

## API structure

Each endpoint is a Python module with four functions:

| Function           | Blocking | Returns                |
|--------------------|----------|------------------------|
| `sync`             | Yes      | Parsed data or `None`  |
| `sync_detailed`    | Yes      | Full `Response` object |
| `asyncio`          | No       | Parsed data or `None`  |
| `asyncio_detailed` | No       | Full `Response` object |

Endpoints are grouped by tag under `arbi_client.api`:

```
arbi_client.api.user          # login, register, settings
arbi_client.api.workspace     # workspace management
arbi_client.api.document      # document upload and tagging
arbi_client.api.conversation  # conversations and messages
arbi_client.api.assistant     # AI assistant queries
arbi_client.api.tag           # tag management
arbi_client.api.configs       # configuration management
arbi_client.api.notifications # notification management
arbi_client.api.health        # health checks
```

## Links

- [ARBI](https://arbicity.com)
- [PyPI](https://pypi.org/project/arbi/)

