Skip to main content

Official Python SDK for the Cerul video search API

Project description

cerul

The video search layer for AI agents — Python SDK.

Teach your AI agents to see. Search what was said, shown, or presented in any video.

Docs · Website · Main Repo

PyPI License Python


Install

pip install cerul

Quick Start

from cerul import Cerul

client = Cerul()  # reads CERUL_API_KEY from env

result = client.search(
    query="Sam Altman on AGI timeline",
    max_results=5,
    include_answer=True,
    filters={"speaker": "Sam Altman"},
)

for r in result.results:
    print(f"{r.title} ({r.score}) — {r.url}")

Features

  • Sync + AsyncCerul for sync, AsyncCerul for async
  • Minimal dependencieshttpx only
  • Dataclass responses — typed results, no pydantic required
  • Timeout — configurable, default 30s
  • Optional retry — 429 reads Retry-After, 5xx exponential backoff
  • API key resolution — parameter > CERUL_API_KEY env var

Async

from cerul import AsyncCerul

async with AsyncCerul() as client:
    result = await client.search(query="attention mechanism explained")
    print(len(result.results))

Configuration

client = Cerul(
    api_key="cerul_sk_...",     # or reads CERUL_API_KEY
    timeout=30.0,               # seconds, default 30
    retry=True,                 # retry 429/5xx, default False
)

Usage Monitoring

usage = client.usage()
print(f"{usage.credits_used} / {usage.credits_remaining} credits")

Errors

from cerul import Cerul, CerulError

try:
    Cerul().search(query="test")
except CerulError as e:
    print(e.status_code, e.code, e.message)

Ecosystem

Package Description
cerul Main repo — API, docs, skills, remote MCP
cerul TypeScript SDK
cerul-cli CLI tool (Rust)

License

MIT

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

cerul-0.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

cerul-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file cerul-0.0.1.tar.gz.

File metadata

  • Download URL: cerul-0.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cerul-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a99539af4da85fce94872875869906cb916bffc173a959b58dc3c8ac17d3b1be
MD5 16ed467840f25ad4bbcc866db21ddebd
BLAKE2b-256 aa79e8ab52ffaf11e81fa67f6b8c4c920e4f40f3f217a8db1b07f831f84acee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cerul-0.0.1.tar.gz:

Publisher: publish.yml on cerul-ai/cerul-python

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

File details

Details for the file cerul-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cerul-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cerul-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68ac814bbfb96eaea3464f109a9ebb909eec6ac88d3d928341baf14739f25de6
MD5 1f9442068590e7ff4d8620d66f7ccbff
BLAKE2b-256 85f471280a051ccf44f5f4cb55d34a4812b24ebc3deea2c1c3a3d7a88dfd364a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cerul-0.0.1-py3-none-any.whl:

Publisher: publish.yml on cerul-ai/cerul-python

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