Python client for Pareta — deploy open-weights endpoints, run metered inference, and eval models on your own data.
Project description
pareta
Python client for Pareta — deploy open-weights endpoints, run metered inference, browse the benchmark catalog, and eval models on your own data.
pip install pareta # or: uv add pareta / poetry add pareta
from pareta import Pareta
pa = Pareta.from_env() # reads PARETA_API_KEY
# or: Pareta(api_key="pareta_sk_…", base_url="https://api.pareta.ai")
# OpenAI-compatible inference against a deployed endpoint
resp = pa.chat.completions.create(
model="ep_…", # an endpoint id (see pa.models.list())
messages=[{"role": "user", "content": "Extract the total from this invoice: …"}],
)
print(resp.choices[0].message.content)
# Streaming
for chunk in pa.chat.completions.create(model="ep_…", messages=[...], stream=True):
print(chunk.choices[0].delta.content or "", end="")
# List the models (endpoints) your org can call
for m in pa.models.list():
print(m.id)
Async mirrors the sync client:
from pareta import AsyncPareta
async with AsyncPareta.from_env() as pa:
resp = await pa.chat.completions.create(model="ep_…", messages=[...])
Auth
Mint a pareta_sk_ key in the dashboard (key management is browser-only) and
pass it as api_key= or via PARETA_API_KEY. The SDK only ever consumes a
key; it never creates, lists, or revokes them.
Inference is OpenAI-compatible
You don't even need this SDK to call a deployed endpoint — point the openai
client at base_url + your key:
from openai import OpenAI
client = OpenAI(api_key="pareta_sk_…", base_url="https://api.pareta.ai/v1")
This SDK's unique value is the control plane: deploy, operate, and eval
models from code. Those land slice by slice — see SDK_PLAN.md.
Errors
All errors subclass pareta.ParetaError:
| Exception | When |
|---|---|
AuthenticationError (401) |
bad/missing key |
InsufficientCreditsError (402) |
org out of credit — top up in the dashboard |
NotFoundError (404) |
unknown endpoint |
EndpointNotReadyError (503) |
endpoint stopped / cold / provider down |
RateLimitError (429) |
throttled (auto-retried) |
BadRequestError (400/422) |
malformed request |
APIConnectionError / APITimeoutError |
transport failure (auto-retried) |
Idempotent GETs and 429/5xx/timeouts are retried with exponential backoff
(max_retries, default 2).
Status
Slice 1 (this release): core client, auth, retries, typed errors,
chat.completions, models. Endpoints, tasks, and evals land next
(SDK_PLAN.md §11).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pareta-0.1.0.tar.gz.
File metadata
- Download URL: pareta-0.1.0.tar.gz
- Upload date:
- Size: 231.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7a20353bd040a9c49a257e944e358b283d596764e1d0bea67797d40d8fb020e
|
|
| MD5 |
09afdc3caa7d18ec1ec92a1285648c91
|
|
| BLAKE2b-256 |
2fe97d9d01fcee8c92a73eef8e058fb561793d0d21ae2f36b65e2846b0022b20
|
Provenance
The following attestation bundles were made for pareta-0.1.0.tar.gz:
Publisher:
publish.yml on Pareta-AI/pareta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pareta-0.1.0.tar.gz -
Subject digest:
b7a20353bd040a9c49a257e944e358b283d596764e1d0bea67797d40d8fb020e - Sigstore transparency entry: 1855569995
- Sigstore integration time:
-
Permalink:
Pareta-AI/pareta@8295369c0bd5264f9d8a1e54c9cc7f9d3d0ef50b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Pareta-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8295369c0bd5264f9d8a1e54c9cc7f9d3d0ef50b -
Trigger Event:
release
-
Statement type:
File details
Details for the file pareta-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pareta-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66c9d99a827379a5386702ea5584e92d34baf135f93fe9356311749c693be7a1
|
|
| MD5 |
a7c8fe12a556bba4c0aab77398407983
|
|
| BLAKE2b-256 |
83e22b20a177b0a17116072c9c34d72256d45ab94b505845e49ad26d7c8c6ccb
|
Provenance
The following attestation bundles were made for pareta-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Pareta-AI/pareta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pareta-0.1.0-py3-none-any.whl -
Subject digest:
66c9d99a827379a5386702ea5584e92d34baf135f93fe9356311749c693be7a1 - Sigstore transparency entry: 1855570008
- Sigstore integration time:
-
Permalink:
Pareta-AI/pareta@8295369c0bd5264f9d8a1e54c9cc7f9d3d0ef50b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Pareta-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8295369c0bd5264f9d8a1e54c9cc7f9d3d0ef50b -
Trigger Event:
release
-
Statement type: