Skip to main content

arcane-sdk

Official Python SDK for the Arcane public API.

Installation

pip install arcane-sdk

Quick Start

Sync client

from arcane_sdk import ArcaneClient

client = ArcaneClient(
    base_url="https://your-instance.example.com",
    api_key="your-api-key",
)

# List prompts
prompts = client.prompts.list()

# Get a dataset (paginated rows)
dataset = client.datasets.get("dataset-uuid", {"page": 1, "limit": 20})

# Iterate over all rows without loading everything
for row in client.datasets.list_rows_paginated("dataset-uuid"):
    print(row["values"])

# Add a row
new_row = client.datasets.add_row("dataset-uuid", ["input1", "input2", "expected"])

# Search traces
search_result = client.traces.search("datasource-uuid", {"limit": 100})

# Iterate over experiment results (paginated, memory-efficient)
for result in client.experiments.list_results_paginated("experiment-uuid"):
    print(result["dataset_row"], result["experiment_result"])

Async client

import asyncio
from arcane_sdk import ArcaneClientAsync

async def main():
    async with ArcaneClientAsync(
        base_url="https://your-instance.example.com",
        api_key="your-api-key",
    ) as client:
        prompts = await client.prompts.list()
        datasets = await client.datasets.list()

        async for result in client.experiments.list_results_paginated(
            "experiment-uuid"
        ):
            print(result)

asyncio.run(main())

Authentication

Use a project-scoped API key. Create one in the Arcane UI under Project → API Keys.

The SDK uses HTTP Basic Auth with username api-key and the API key as the password.

Resources

Resource Methods
prompts list(), get(id), list_versions(id), get_latest_version(id)
datasources list()
traces search(), get(), get_attribute_names(), get_attribute_values()
datasets list(), get(id, params?), list_rows_paginated(id), add_row(id, values)
entities list(), get(id)
evaluations list(), get(id), get_experiment_scores(), create(), create_result()
experiments list(), get(id), list_results(), list_results_paginated(), create(), create_result()

Async iterators

For paginated experiment results:

# Sync
for result in client.experiments.list_results_paginated(experiment_id):
    ...

# Async
async for result in client.experiments.list_results_paginated(experiment_id):
    ...

For paginated dataset rows:

# Sync
for row in client.datasets.list_rows_paginated(dataset_id):
    print(row["values"])

# Async
async for row in client.datasets.list_rows_paginated(dataset_id):
    print(row["values"])

Error handling

from arcane_sdk import ArcaneClient, ArcanApiError, ArcanNotFoundError

try:
    client.datasets.get("invalid-id")
except ArcanNotFoundError:
    print("Dataset not found")
except ArcanApiError as e:
    print(e.status_code, e.message, e.request_id)

Retries

The SDK automatically retries on HTTP 5xx and network errors. Configure with max_retries (default: 3):

client = ArcaneClient(
    base_url="https://api.example.com",
    api_key="...",
    max_retries=5,
)

License

MIT

Metadata

Release files for arcane-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arcane-sdk 0.1.0
File Size Uploaded Provenance
arcane_sdk-0.1.0.tar.gz 7.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arcane-sdk 0.1.0
File Interpreter ABI Platform
arcane_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / arcane_sdk-0.1.0.tar.gz

Download URL arcane_sdk-0.1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1c2244a1ab6cfb4f89d3ed395bd5987ade6a4595fb2711e16c7e46780447ab9f
BLAKE2b-256 checksum
How to use checksums
84faa1f41e5a8d3310399419fb2dc4ccfeb0567260f985140a019c40af1e513d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / arcane_sdk-0.1.0-py3-none-any.whl

Download URL arcane_sdk-0.1.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
456b7443f0b73454f7d1122f3a883245e42590c6581e0f2f0e76ee07e558e10c
BLAKE2b-256 checksum
How to use checksums
4d8d18677f64c94deac61605abecb1d4840c26fb03823d02e27d613266ec957f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for arcane-sdk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page