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.2.tar.gz (7.9 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.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cerul-0.0.2.tar.gz
  • Upload date:
  • Size: 7.9 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.2.tar.gz
Algorithm Hash digest
SHA256 3a8cf388fba3759fa3728683c9e212e3673a9ac9943e4f5599f1a01e1cc7f673
MD5 20f4d94e2f32cde507ae32b206b49de6
BLAKE2b-256 ee4d5f114eeecebe331a3307178c2b6fd0ba6880f611bfeed501aa3f775fa05c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cerul-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: cerul-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a031977f0d7378470c668a78e5bd25fa3bdef57387cbdd74f5ec500bb801621d
MD5 72ddf400cd94ed60b2484eecff4c959a
BLAKE2b-256 af38974c874c6d9e7ee976a4c9c94fcc7ce8b7ca9feaac743d65e75d931f7a53

See more details on using hashes here.

Provenance

The following attestation bundles were made for cerul-0.0.2-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