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

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.4
File Interpreter ABI Platform Actions
sqlite_tessera-1.4.4-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.4.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
sqlite_tessera-1.4.4-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for sqlite_tessera-1.4.4-py3-none-macosx_14_0_arm64.whl

Total release size: 1.0 MB

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

Download URL sqlite_tessera-1.4.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 612.5 kB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7d23233666960b4c056683d85090ccd8e6a6c350a973b0fe506b6a4eabe813c8
BLAKE2b-256 checksum
How to use checksums
6070e37711251fc00c521e3b1baaf9e32ec9d5ad370a1199d0f218da26a45801
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.4-py3-none-macosx_14_0_arm64.whl

Download URL sqlite_tessera-1.4.4-py3-none-macosx_14_0_arm64.whl
Size 395.3 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
d0e36d7af210e7ee312d44c5cdd2540c79aad64d6c1b8fc16122a57271602905
BLAKE2b-256 checksum
How to use checksums
da818cf9d8006363fc8422a16bb0b52fe015ad6b7b53778b22e6228708238bc9
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.4

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