Official Python SDK for the EigenPal API
Project description
eigenpal
Trigger and inspect Eigenpal automations from Python.
Install
pip install eigenpal
Requires Python 3.9+. Get an API key at studio.eigenpal.com -> Settings -> API Keys.
Quick Start
import os
from pathlib import Path
from eigenpal import EigenpalClient
client = EigenpalClient(api_key=os.environ["EIGENPAL_API_KEY"])
result = client.run_and_wait(
"workflows.extract-invoice",
input={"contract_document": Path("contract.pdf")},
)
print(result.finished, result.output)
target is always typed: workflows.<slug> or agents.<slug>. That keeps workflow and agent slugs unambiguous.
Automations
Workflows and agents are exposed as automations.
listing = client.automations.list(search="invoice")
automation = client.automations.get("workflows.extract-invoice")
versions = client.automations.versions("workflows.extract-invoice")
triggers = client.automations.triggers("workflows.extract-invoice")
Runs
started = client.run("agents.invoice-agent", input={"invoice": Path("invoice.pdf")})
run = client.runs.get(started.id, expand=["usage", "execution"])
usage = client.runs.usage(started.id)
steps = client.runs.steps(started.id)
events = client.runs.events(started.id)
trace = client.runs.trace.get(started.id)
client.runs.cancel(started.id)
client.rerun(started.id, wait_for_completion=60)
List calls use the same run API for workflows, agents, manual runs, and eval runs:
recent_failures = client.runs.list(
type="workflow",
status="failed,cancelled",
limit=50,
)
Files And Artifacts
Use client.files for reusable upload-first blobs. When referenced by a run input, Eigenpal snapshots the file into run-scoped artifacts.
uploaded = client.files.upload(Path("contract.pdf"))
started = client.run(
"workflows.extract-invoice",
input={"contract_document": {"fileId": uploaded.id}},
)
artifacts = client.runs.artifacts.list(started.id)
content = client.runs.artifacts.download(started.id, artifacts.artifacts[0].path)
You can also pass a Path, file handle, or {"content": bytes, "filename": str, "mime_type": str} directly to client.run; the SDK sends multipart form data automatically.
Errors
Every non-2xx response raises a typed subclass of EigenpalError:
| HTTP | Class |
|---|---|
| 400 | EigenpalValidationError |
| 401 | EigenpalAuthError |
| 403 | EigenpalForbiddenError |
| 404 | EigenpalNotFoundError |
| 429 | EigenpalRateLimitError |
| 5xx | EigenpalServerError |
| timeout | EigenpalTimeoutError |
Reference
| Topic | What is in it |
|---|---|
| Automations | List, inspect, versions, triggers. |
| Runs | Start, poll, cancel, rerun, usage, steps, events, traces, reviews. |
| File inputs | Multipart upload from Path, file handle, or bytes. |
| Errors | Typed exceptions, retries, request ids. |
| Configuration | API key, base_url, timeouts, headers. |
| Full API reference | Every method, generated from OpenAPI. |
License
Apache-2.0.
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 eigenpal-0.10.3.tar.gz.
File metadata
- Download URL: eigenpal-0.10.3.tar.gz
- Upload date:
- Size: 80.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6122fdceba926ea886520e8df1db6b494875238a99b10754a8134e085b54792
|
|
| MD5 |
cdf88c81056fff2894a5e57e89ce62ba
|
|
| BLAKE2b-256 |
4ba34bae6a75ff073616df73a4f08a74789afc87ddda37b788bb0b14d75c30c8
|
Provenance
The following attestation bundles were made for eigenpal-0.10.3.tar.gz:
Publisher:
release.yml on eigenpal/eigenpal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eigenpal-0.10.3.tar.gz -
Subject digest:
e6122fdceba926ea886520e8df1db6b494875238a99b10754a8134e085b54792 - Sigstore transparency entry: 1938733655
- Sigstore integration time:
-
Permalink:
eigenpal/eigenpal@e48cb8102d0188f914bb5fb151b0382afb23985f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/eigenpal
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@e48cb8102d0188f914bb5fb151b0382afb23985f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eigenpal-0.10.3-py3-none-any.whl.
File metadata
- Download URL: eigenpal-0.10.3-py3-none-any.whl
- Upload date:
- Size: 246.4 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 |
a6af929dbc3399802c9d0ce3ecdabc02b98b992067a719c268392610f50f8b4e
|
|
| MD5 |
2f8d54eb8985c3d48f5713186c01dd6b
|
|
| BLAKE2b-256 |
124edc4278fd5463496ce866a06dad400cd22c0d731f03d8cedcc574c85531f6
|
Provenance
The following attestation bundles were made for eigenpal-0.10.3-py3-none-any.whl:
Publisher:
release.yml on eigenpal/eigenpal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eigenpal-0.10.3-py3-none-any.whl -
Subject digest:
a6af929dbc3399802c9d0ce3ecdabc02b98b992067a719c268392610f50f8b4e - Sigstore transparency entry: 1938733911
- Sigstore integration time:
-
Permalink:
eigenpal/eigenpal@e48cb8102d0188f914bb5fb151b0382afb23985f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/eigenpal
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@e48cb8102d0188f914bb5fb151b0382afb23985f -
Trigger Event:
workflow_dispatch
-
Statement type: