Skip to main content

Periplus Python SDK

SQL access to the ClickHouse corpus through the Periplus HTTP API. Install from PyPI:

python -m pip install --upgrade periplus-python-sdk
from periplus_sdk import Client

with Client("https://api.periplus.dev", api_key="ppl_…") as client:
    result = client.execute(
        "SELECT capture_id, url FROM public_v1.captures LIMIT ?", [10]
    )
    print(result.columns, result.rows)

Use PERIPLUS_API_URL to omit the URL argument and PERIPLUS_API_KEY to supply your personal organization API key. A key with organization:sql:exec is required. Database usernames/passwords and anonymous access are not supported. Use HTTPS outside loopback development. Connect directly to the API origin, not the public marketing site.

Version 0.9.0 requires personal API keys instead of database credentials. Create a key in the app's Settings → API keys with organization:sql:exec permission. For local development, install ./clients/periplus-python-sdk from the repository root and connect to http://localhost:8000.

AsyncClient accepts the same options. prepare explains a SELECT; execute returns typed columns/rows for read-only queries. schema() returns visible tables, column types/descriptions and helper documentation. All SQL uses POST /api/v1/sql; schema discovery uses GET /api/v1/schema. ClickHouse enforces permissions. The SDK never retries automatically, including failed queries.

Public HTML joins use parse_id and node_index; document_id identifies exact raw bytes. Public shorthand uses the public_v1 schema.

For notebook/SQLAlchemy integration:

from periplus_sdk import sql_api
from sqlalchemy import text

engine = sql_api.create_engine(base_url="http://localhost:8000", api_key="ppl_…")
with engine.connect() as connection:
    print(connection.execute(text("SELECT url FROM public_v1.captures LIMIT 5")).all())
engine.dispose()

Marimo discovers accessible tables and views through the schema endpoint. Column reflection uses SELECT * ... LIMIT 0 to retrieve native types without reading corpus rows; no SHOW, DESCRIBE, or system-table access is required.

The DB-API connection advertises the ClickHouse dialect and converts native nullable integer, decimal, date and datetime types. Nested types retain JSON wire values. Writes are not exposed through the query API. There are no client transactions; each statement is independent. Streaming cursors expose incomplete/truncated results explicitly; configure allow_partial only when partial results suit the application.

See the public schema and query boundary.

Release files for periplus-python-sdk 0.9.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 periplus-python-sdk 0.9.0
File Size Uploaded
periplus_python_sdk-0.9.0.tar.gz 36.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for periplus-python-sdk 0.9.0
File Interpreter ABI Platform
periplus_python_sdk-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.8 kB

Release files / periplus_python_sdk-0.9.0.tar.gz

Download URL periplus_python_sdk-0.9.0.tar.gz
Size 36.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8e996501add24265421acaefba464dcbdd460a6fecd604fc76e49cace441c725
BLAKE2b-256 checksum
How to use checksums
a58077e4b332e94f2ec6f6272257d15a39d5f43cff0390cdb8a16fefdf1ca23c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / periplus_python_sdk-0.9.0-py3-none-any.whl

Download URL periplus_python_sdk-0.9.0-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03d98e33875d95aa3b7dfaf2918d7d773e9f29ac442e5c6dbfc07f041436bc14
BLAKE2b-256 checksum
How to use checksums
d26784e9f5250f46c8321ec99975e52055371055d97c4eb1bedd346f58bccbc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.11.0

2 release files

This release

0.9.0 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.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