Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Assay for Python

Native analytical SQL with Arrow results. Version 0.1.0a1 is an experimental alpha. The packaged fast engine is tested, not proved, and does not include linked verified execution. Separate proof research describes its own narrower scope. Only read Parquet files you trust.

Install the alpha from PyPI:

python -m pip install --only-binary=:all: 'assaydb==0.1.0a1'

A supplied wheel can also be installed with python -m pip install --only-binary=:all: /path/to/assaydb.whl, using its actual filename. No Rust compiler is needed to install a wheel. Python 3.10 or later and PyArrow are required.

import assaydb

with assaydb.connect() as db:
    db.execute("CREATE TABLE events (id INTEGER, label TEXT)")
    db.execute("INSERT INTO events VALUES (9007199254740993, 'hello'), (2, 'world')")
    result = db.sql("SELECT id, label FROM events ORDER BY id")

print(result.to_arrow())
# result.to_pandas()  # Install pandas separately if needed.
# result.to_polars()  # Install polars separately if needed.

Read local files with read_parquet('events.parquet') and read_csv('events.csv') in SQL. CSV has a required header and all columns start as TEXT; use CAST(id AS INTEGER) for integers. Empty fields are empty strings, so use NULLIF(column, '') explicitly when wanted. Quoted commas and newlines are supported. Paths must name local regular files, without URLs or globs; keep files unchanged while queries run. Connections enable reading by default; connect(allow_local_files=False) refuses these functions and is not a directory sandbox. CSV is a bounded import intended for small files; Parquet uses scans.

execute() and sql() execute one statement. Query results provide to_arrow(), to_pandas(), to_polars(), rowcount and is_query. DML results provide affected rowcount; asking for a DML table raises SQLError. Native operations release the GIL, and one connection serializes its operations. Connections own independent temporary catalogs; completed results survive close.

These are not persistent database files or Python DB-API connections. Parameters, transactions and streaming cursors are not implemented by this wrapper. Unsupported SQL raises UnsupportedError, invalid SQL raises SQLError, limits raise ResourceError, and closed connections raise ConnectionClosedError. All derive from AssayError; InternalError reports unexpected engine/storage failures. A caught panic closes the connection. Refusal advice appears in the exception text and .hint, with the original diagnostic in .native_message. Advice never rewrites or retries SQL. REAL casts may round large integers; INTEGER casts truncate fractional values.

Defaults: one worker, 256 MiB accounted query memory, 64 MiB catalog allowance and 64 MiB serialized result limit. Set workers, memory_bytes, catalog_bytes and max_result_bytes explicitly to override them. Catalog allowance must be at most one quarter of query memory. directory= chooses the parent of a private temporary catalog directory. Closing removes only that session's own files. These limits do not cap total process memory.

Arrow IPC preserves engine types, binary values and NULLs, while copying results into Python-owned memory. It is not zero-copy execution. pandas conversion uses Arrow dtypes by default to preserve nullable integers above 2^53; supplying your own types_mapper changes that conversion policy. Polars converts the resulting Arrow table; neither optional dependency executes SQL for Assay.

Current local wheel and rebuilt-sdist checks pass all eleven tests on fresh macOS arm64 Python 3.14, including the nested-INSERT regression. Earlier native CI passed Linux x86_64 and macOS arm64 Python 3.10–3.13 installs; native CI records the exact revision tested by the expanded Python 3.10–3.14 matrix. Package tests and wheel tags do not establish full SQL compatibility.

See the notebook and build instructions.

Metadata

Release files for assaydb 0.1.0a1

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

Source distribution (sdist)

Source distribution for assaydb 0.1.0a1
File Size Uploaded
assaydb-0.1.0a1.tar.gz 617.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for assaydb 0.1.0a1
File Interpreter ABI Platform
assaydb-0.1.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
assaydb-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 13.5 MB

Release files / assaydb-0.1.0a1.tar.gz

Download URL assaydb-0.1.0a1.tar.gz
Size 617.2 kB
Tags Source
SHA-256 checksum
How to use checksums
be44b3667991a5daf0d3c1e51a5377fffe273d99a1fc213253e6595bee5e3cb4
BLAKE2b-256 checksum
How to use checksums
a95c3a53bd179d27c209b55fa52417509d73e0bb57f22d41ebb6cb97be9608af
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 Oct 10, 2026.

Transparency log

Release files / assaydb-0.1.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL assaydb-0.1.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2a7a84a4a8b9e11de1e5d77bc40650ef33ec29ea2fccf0ece84eda2bdaaa9f4f
BLAKE2b-256 checksum
How to use checksums
173689bbb9624d391865f1b415ecf0d653b1b1ece939e7f46978b063fc5d6ffa
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 Oct 10, 2026.

Transparency log

Release files / assaydb-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl

Download URL assaydb-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9417e292cef946189c77f3b750f6bfcaafa684e56248d8c58baaaa477d774638
BLAKE2b-256 checksum
How to use checksums
9c8e4126efdc23cede6cbb68372e54f14f1c545059ae091339d2d0a2deda47a4
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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

3 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