Skip to main content

Blockquote Python SDK and CLI

Official client for Blockquote. Requires Python 3.10 or later. No runtime dependencies.

pip install blockquote-agents
import os
import uuid
from blockquote_agents import Blockquote, BlockquoteError

client = Blockquote(api_key=os.getenv("BLOCKQUOTE_API_KEY"))
started = client.start_scan("https://example.com", idempotency_key=str(uuid.uuid4()))
print(started.data, started.headers.get("Retry-After"))
# Wait for Retry-After, then read the returned id.
report = client.get_scan(started.data["id"])
comparison = client.compare_scans(from_id="BASELINE_ID", to_id="NEW_ID")

Each call returns a Response with data, status, and HTTP headers. BlockquoteError retains data, status, headers, and retry_after. Network errors pass through. Requests time out after 30 seconds. Set timeout in the constructor to change this. The client does not retry or poll automatically. Scans can return a cached result or pending status. Reuse an idempotency key only when you repeat the same scan request.

Public report reads need no key. Account access uses an optional bearer key from your account. Keys require Pro or Agency. Unattended scan creation can require a paid key with the scan scope. Human verification still applies where required. Pass turnstile_token when available; the SDK does not obtain or bypass verification. Pass refresh=True to request a fresh scan with account authentication. Scan quotas still apply. Read access and comparison output follow your account plan.

See the API reference and OpenAPI document.

Run tests from this package directory:

python3 -m unittest discover -s tests

Command line

The package installs the blockquote command. python -m blockquote_agents runs the same CLI.

python -m pip install --upgrade blockquote-agents
blockquote --help
blockquote read SCAN_ID
blockquote scan https://example.com --idempotency-key UNIQUE_REQUEST_ID
blockquote compare BASELINE_ID NEW_ID

Set BLOCKQUOTE_API_KEY for account access. Set BLOCKQUOTE_TURNSTILE_TOKEN only when you have a human verification token. Use --refresh with scan to request a fresh scan. Authentication and quota rules remain the same. The CLI prints JSON with data, status, and headers. It does not poll or retry. HTTP failures print server data, headers, status, and retryAfter to stderr with exit code 1. Other request failures print only their error type to avoid exposing credentials. Invalid arguments exit with code 2.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

blockquote_agents-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file blockquote_agents-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for blockquote_agents-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9dfe5b7c4a12f0c3fac9ac32bc3c33fa5c8a0fd7b2becc4153af04b96a5113d4
MD5 f661c54b88875707fc7b2df51696128a
BLAKE2b-256 b4d104c1a236a90f785b183e624c652be86f8438824eb9d10ffefcf6aee166b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for blockquote_agents-0.1.1-py3-none-any.whl:

Publisher: publish-python.yml on ArneFfm/blockquote-agents

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 file

0.1.0

1 file

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