Skip to main content

Sery Python SDK

Query your private data mesh by sery:// address — one SQL statement, run on whichever machine holds the data. Raw data never moves through Sery; only result rows come back.

pip install sery          # core
pip install sery[pandas]  # + .to_pandas()

Quick start

import sery

client = sery.Client(api_key="sery_...")  # from app.sery.ai → Settings → API Keys

df = client.query("""
    SELECT customer, SUM(amount) AS total
    FROM 'sery://sam-laptop/local/sales/orders.parquet'
    GROUP BY customer
    ORDER BY total DESC
""").to_pandas()

Addresses

Sources are addressed as sery://<machine>/<protocol>/<path>:

  • <machine> — a machine's stable id or its name (e.g. sam-laptop)
  • <protocol> — local, s3, or https
  • <path> — the file path / bucket key

Discover what's addressable with the catalog:

for src in client.catalog():
    print(src.sery_uri, "—", src.machine, src.file_format)
    # sery://sam-laptop/local/sales/orders.parquet — sam-laptop parquet

Pass any sery_uri straight into query().

Results

result = client.query("SELECT * FROM 'sery://my-mac/local/data.parquet' LIMIT 5")

result.columns          # ['id', 'name', ...]
result.rows             # [[1, 'a'], [2, 'b'], ...]
for row in result:      # iterate as dicts
    print(row["name"])
result.to_pandas()      # DataFrame (needs pandas)

result.incomplete       # True if a machine didn't respond
result.warnings         # human-readable warnings to surface

When incomplete is True, one or more machines were offline — check warnings before trusting an aggregate (a SUM/COUNT may undercount).

Errors

Every failure is a typed exception (sery.errors):

Exception When
AuthError missing / invalid API key (401)
QueryError no sery:// refs, bad address, unsupported protocol (400)
MachineNotFound unknown machine (404)
AmbiguousMachine a name matched >1 machine — .candidates lists machine_ids (409)
CrossMachineJoinUnsupported the query spans machines — .machines (422)
MachinesUnavailable every targeted machine offline — .failures (503)
import sery

try:
    client.query("SELECT * FROM 'sery://laptop/local/x.parquet'")
except sery.AmbiguousMachine as e:
    for c in e.candidates:
        print(c["label"], c["machine_id"])  # re-issue with the machine_id

Limitations (v1)

  • All sources in one query must live on the same machine — cross-machine joins raise CrossMachineJoinUnsupported.
  • Routable protocols: local, s3, https.

License

MIT

Metadata

Release files for sery 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 sery 0.2.0
File Size Uploaded Provenance
sery-0.2.0.tar.gz 10.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 18.4 kB

Release files / sery-0.2.0.tar.gz

Download URL sery-0.2.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aac64810337ed8acba51cd1da7ae64471a39d57b18fed6065e8964c08cbb77b1
BLAKE2b-256 checksum
How to use checksums
977bd8906c57383a16c497a861bdea3824912d9d6ddb6723d8a29f323b9defda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 17, 2026.

Transparency log

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

Download URL sery-0.2.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5aa9f77b57e3012384d8b9b82917f1c9daf13d38d3970dbd722920f38e3fe28
BLAKE2b-256 checksum
How to use checksums
77cbb6425be1f8cba2b7f11d8ce5f9bac4d65edf147819283293c30c1816f921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 17, 2026.

Transparency log

Security for sery 0.2.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sery-0.2.0.tar.gz

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 Jun 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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