Skip to main content

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

Project description

hyperclipco

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"],
    base_url="https://YOUR-PROJECT.supabase.co/functions/v1/api-v1",
)

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 yes
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.0.tar.gz (3.3 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.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyperclipco-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hyperclipco-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f45b827b8b86f38dcb6b7cfd6d47ae65721382248aca6b604bd859c97b3556a1
MD5 5277b622c5df15eb07f3501508b5904d
BLAKE2b-256 7d453470212dec13d721c9555d18a25d6e4e4474c4dba0f57385ea781ed023b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hyperclipco-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hyperclipco-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24209519c849da678c919194bf4775e9d68a2053429de3e82afa65652b37bdf9
MD5 ca99ebec396b958e33adcf646303048d
BLAKE2b-256 8d5b6140ae6cfa7ddee8ba9aee456b254512e38320192db6b002458e07e525c0

See more details on using hashes here.

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