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

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.3.0
File Interpreter ABI Platform Actions
sqlite_tessera-1.3.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for sqlite_tessera-1.3.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
sqlite_tessera-1.3.0-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for sqlite_tessera-1.3.0-py3-none-macosx_14_0_arm64.whl

Total release size: 842.7 kB

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

Download URL sqlite_tessera-1.3.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 511.2 kB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5868da65f6fa275e0e07ac2f6da47f0c1af08f42611201f5a5e42fbdc9cc2b4d
BLAKE2b-256 checksum
How to use checksums
b2f4f29bfe6a53d26bf0580024f69393016230186c64ea5d6a4bb5f9421ff95b
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.3.0-py3-none-macosx_14_0_arm64.whl

Download URL sqlite_tessera-1.3.0-py3-none-macosx_14_0_arm64.whl
Size 331.5 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
e12560223a9c9b905b2b9e13bc65a0ce702507f947664d52f2d50b8a56f5be25
BLAKE2b-256 checksum
How to use checksums
8c04dcc7bfaf837d2a3e8b50b3e8746dcf62a4f9197025dec6e40e31fd9d6111
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.3.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.

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