Skip to main content

Official Python SDK for the Hyperclip API — create, poll, and manage flow runs.

Project description

hyperclipco

PyPI PyPI downloads Python versions

Official Python SDK for the Hyperclip API.

Installed as hyperclipco (the unscoped hyperclip name was already taken on PyPI). Imports as hyperclipco.

Install

pip install hyperclipco

Requires Python 3.9+.

Quickstart

import os, uuid
from hyperclipco import Hyperclip

hc = Hyperclip(api_key=os.environ["HYPERCLIP_API_KEY"])

ref = hc.runs.create(
    flow_id="a3c7f1ea-1234-4abc-bb11-5faed63c7e90",
    inputs={"prompts": {0: "a lighthouse at dawn"}},
    idempotency_key=str(uuid.uuid4()),
)

run = hc.runs.wait(
    ref["id"],
    on_update=lambda r: print(r["status"], r.get("current_step")),
)

if run["status"] == "completed":
    print("Video:", run["video_url"])
else:
    print(run["error_code"], run["error_message"])

Configuration

Argument Env var Required
api_key HYPERCLIP_API_KEY yes
base_url HYPERCLIP_BASE_URL no (defaults to Hyperclip production)
timeout no (defaults to 30s)
client no (inject your own httpx.Client)

API

  • hc.runs.create(flow_id=..., flow_schema=..., inputs=..., idempotency_key=...)
  • hc.runs.get(run_id)
  • hc.runs.list(limit=..., status=...)
  • hc.runs.cancel(run_id)
  • hc.runs.wait(run_id, timeout=600, poll_interval=4, on_update=...) — polls until terminal
  • hc.flows.list()
  • hc.flows.get(flow_id)

Errors raise HyperclipError (with .status and .code). Timeouts raise HyperclipTimeoutError.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperclipco-0.1.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperclipco-0.1.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file hyperclipco-0.1.3.tar.gz.

File metadata

  • Download URL: hyperclipco-0.1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hyperclipco-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c2d1afbc51fb63ca34a53f5ab11f1edd33ae5f2eea818a4a48a893685e0769fb
MD5 9f01c851e5a7ffcad7cfb06ac66dba61
BLAKE2b-256 f21798ccfbde46f9a2d574bd477667276d5053e1142150490c3ed53def452389

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyperclipco-0.1.3.tar.gz:

Publisher: publish-python.yml on hyperclip/hyperclip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hyperclipco-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: hyperclipco-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hyperclipco-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e99a5a0ca247f8889999177aa04bca494a5493bdeca37166bf052eff91518b22
MD5 6bf1a44d3059fc382ecd2efeca4b8d49
BLAKE2b-256 623003a8b1b18240ebb22f72fdf1842e50234995c12b83fb80535ed3e1d0e0ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyperclipco-0.1.3-py3-none-any.whl:

Publisher: publish-python.yml on hyperclip/hyperclip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page