Skip to main content

sqlite-tessera

Tessera as a SQLite extension: fast join-aggregates over skewed sparse relations, with exact results. A join-aggregate counts or sums the joined rows of each pair of values, as in word co-occurrence, item-to-item recommendation, or common-neighbor counting. Tessera computes it as a sparse matrix product instead of building one joined row for every two rows that share a key.

pip install sqlite-tessera
import sqlite3
import sqlite_tessera

db = sqlite3.connect("data.db")
db.enable_load_extension(True)
sqlite_tessera.load(db)
db.enable_load_extension(False)

# SELECT a.x, b.x, COUNT(*) FROM t a JOIN t b ON a.k = b.k GROUP BY a.x, b.x
rows = db.execute("SELECT x0, x1, s FROM tessera_xtx('t', 'k', 'x')").fetchall()
# pairs with Jaccard similarity of at least 0.5
pairs = db.execute("SELECT x0, x1, s FROM tessera_sim('t', 'k', 'x', 'jaccard', 0.5)").fetchall()

The functions are tessera_xtx(table, k, x [, v, mode, min, threads]), tessera_xty(table1, k1, x, table2, k2, y [, v, w, min, threads]), and tessera_sim(table, k, x, measure, threshold [, v, mode, threads]). sqlite_tessera.loadable_path() returns the path of the extension for other SQLite clients.

Python's sqlite3 must allow extensions (enable_load_extension); some builds of Python, such as the one that comes with macOS, do not. Connection.interrupt() cancels a run on SQLite 3.41 or newer. Wheels are available for Linux on x86-64 (an AVX2 CPU or newer) and macOS on Apple silicon.

Documentation, the DuckDB, PostgreSQL, and Spark adapters, and the C interface: https://github.com/GyuyeongKim/Tessera-public

Metadata

Release files for sqlite-tessera 1.4.1

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

Built distributions (wheels)

Table of built distributions (wheels) for sqlite-tessera 1.4.1
File Interpreter ABI Platform Actions
sqlite_tessera-1.4.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for sqlite_tessera-1.4.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
sqlite_tessera-1.4.1-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for sqlite_tessera-1.4.1-py3-none-macosx_14_0_arm64.whl

Total release size: 959.3 kB

Release files / sqlite_tessera-1.4.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL sqlite_tessera-1.4.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 565.0 kB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
93b99a1168ef7f0c085726093b176720e48646ccd14aa82ba12a9710caccf264
BLAKE2b-256 checksum
How to use checksums
3156639c1d3e6b3171c263377ea6463c11f5271ea709652cc635e38bbae992c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / sqlite_tessera-1.4.1-py3-none-macosx_14_0_arm64.whl

Download URL sqlite_tessera-1.4.1-py3-none-macosx_14_0_arm64.whl
Size 394.2 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
5d6b3cd0713c368c9708c64182b782335df488c83168ee1ceda57b73903896e3
BLAKE2b-256 checksum
How to use checksums
96e2d8ec4c28ec74a44fc54b40fc4036033c998344534dcab9067dbbf80a2ea3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for sqlite-tessera 1.4.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

1.4.1 This release

2 release files No 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