Skip to main content

capturedit

Official Python SDK for the CapturedIt Context Hub API.

Install

pip install capturedit

Quick start

from capturedit import CapturedIt

client = CapturedIt(api_key="your_api_key")

# Search your library
results = client.search("machine learning")
for item in results.items:
    print(item.title)

# Get context for an AI prompt
context = client.get_context(q="project roadmap", format="text")

# Save a new item
result = client.create_item(
    "link",
    title="Interesting article",
    source_url="https://example.com/article",
)
print(f"Created item: {result.id}")

# Ask about a specific item
response = client.ask_about_item(result.id, question="Summarize this")
print(response.message)

Async usage

from capturedit import AsyncCapturedIt

async with AsyncCapturedIt(api_key="your_api_key") as client:
    results = await client.search("machine learning")
    for item in results.items:
        print(item.title)

Configuration

client = CapturedIt(
    api_key="your_api_key",
    base_url="https://api.capturedit.app",  # optional
    timeout=30.0,                            # optional, seconds
)

Methods

Method Description
get_capabilities() Returns plan tier and feature flags
search(query, *, limit, offset) Full-text search over your items
get_context(*, limit, offset, q, format, include_conversations, max_chars) Recent or query-relevant items for AI context
create_item(type, *, title, content_text, source_url, is_private) Create a new item
capture_file(filename, mime_type, content_base64, *, ...) Upload a file (base64)
get_item(item_id, *, include) Get a single item with enrichments
delete_item(item_id) Delete an item
transcribe(audio_base64, *, mime_type) Speech-to-text (max 20MB decoded audio)
ask(question) Ask a question across your library (uses your plan's ask quota)
ask_about_item(item_id, *, question, preset) Ask about a specific item
list_conversations(item_id, *, limit, offset) Paginated conversation history
delete_conversations(item_id) Clear conversation history for an item

Webhook verification

from capturedit import verify_webhook_signature

is_valid = verify_webhook_signature(
    payload=request.body,
    header=request.headers["X-CapturedIt-Signature"],
    secret="your_webhook_secret",
)

Error handling

from capturedit import RateLimitError, AuthenticationError

try:
    results = client.search("query")
except RateLimitError as e:
    print(f"Retry after {e.retry_after} seconds")
except AuthenticationError:
    print("Invalid API key")

Requirements

  • Python 3.10+
  • CapturedIt API key (create at Dashboard → Security)
  • All plans can use the API from the app surfaces; a Vault plan unlocks full integrator access (api_write) and the context endpoint. ask is available on all plans within your monthly quota.

Publishing (maintainers)

PyPI project name: capturedit.

  1. First release (registers the project): from packages/sdk-python after tests:

    pip install build twine
    python -m build
    twine upload dist/*
    

    Use a PyPI API token with scope for this project.

  2. Ongoing CI: In PyPI → Publishing → Add a trusted publisher → GitHub, point to this repository and workflow .github/workflows/publish-sdk-pypi.yml. Then use Actions → Publish capturedit to PyPI or push tag sdk-python/v0.1.0 (match pyproject.toml version).

  3. Version bumps: Edit version in pyproject.toml before each release.

Metadata

Release files for capturedit 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capturedit 0.2.0
File Size Uploaded
capturedit-0.2.0.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for capturedit 0.2.0
File Interpreter ABI Platform
capturedit-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / capturedit-0.2.0.tar.gz

Download URL capturedit-0.2.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
045a5eeb91df766d8d30cd51f7ab4b306a80b6e43567c88f58b8f178461669d3
BLAKE2b-256 checksum
How to use checksums
21365af399f6a1f325f5f202d731bfad400be055e920eece62352ee4ef4ced36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / capturedit-0.2.0-py3-none-any.whl

Download URL capturedit-0.2.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c04dbeedb37ab28b120b16022d439287704a1f21fae09d58b7e0d95f837c26e
BLAKE2b-256 checksum
How to use checksums
efc899c406ddd3291c06f4899349e5c9506482c790698b002dbbb4dc38e416b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page