Metadata-Version: 2.4
Name: fourtheorem-tempo-client
Version: 0.1.0
Summary: A client library for accessing Tempo API
Author: fourTheorem
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Dist: httpx>=0.23.1,<0.29.0
Requires-Dist: attrs>=22.2.0
Requires-Python: >=3.11
Project-URL: Homepage, https://fourtheorem.com/high-performance-compute/
Description-Content-Type: text/markdown

# fourtheorem-tempo-client

Python client for the public API of [Tempo](https://fourtheorem.com/high-performance-compute/), fourTheorem's high-throughput compute platform for massive-scale modelling workloads. Generated from the platform's OpenAPI specification.

> **Status: early development.** The API surface is small and evolving, and authentication is not implemented yet — use `Client`; the generated `AuthenticatedClient` is boilerplate for a Bearer scheme the API does not support yet. Expect breaking changes until 1.0.

## Install

```bash
pip install fourtheorem-tempo-client
# or
uv add fourtheorem-tempo-client
```

Requires Python 3.11+. Fully typed (`py.typed`); httpx-based, with sync and async variants for every operation.

## Quickstart

```python
from tempo_client import Client
from tempo_client.api.public import get_workload_status, health_check, submit_workload
from tempo_client.models import WorkloadSubmission

client = Client(base_url="https://your-tempo-host/api")

health_check.sync(client=client)

submitted = submit_workload.sync(
    client=client,
    body=WorkloadSubmission.from_dict(
        {
            "name": "demo",
            "jobs": [{"id": "j-1", "name": "Job 1", "work_type": "default", "predecessors": []}],
        }
    ),
)

status = get_workload_status.sync(client=client, workload_id=submitted.workload_id)
print(status.state)
```

Every operation also has an async variant:

```python
status = await get_workload_status.asyncio(client=client, workload_id=submitted.workload_id)
```

## What's covered

Workload submission (inline or via presigned uploads for large job graphs), workload lifecycle (status, cancel, delete, audit trail), job and attempt inspection, the resource-class catalog, and worker-artifact registry uploads — the full public API surface.

## Documentation

The API reference (Scalar, with try-it-out) and narrative guides are served by your Tempo deployment at `/docs/`. The client is regenerated from the platform's OpenAPI specification on every API change, so it always matches the deployed contract.

Learn more about Tempo at [fourtheorem.com/high-performance-compute](https://fourtheorem.com/high-performance-compute/), or about fourTheorem at [fourtheorem.com](https://fourtheorem.com/).

## License

[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
