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

Total release size: 789.0 kB

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

Download URL sqlite_tessera-1.2.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 484.3 kB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
777ea416350b0c4e4d7fce064222491538fa4f4908be1248cc2d3b5210a378b3
BLAKE2b-256 checksum
How to use checksums
0c26eb354b4f0dc22c29e9b483d05a0e7058c162f797bb48d6eced05d225057c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

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

Download URL sqlite_tessera-1.2.1-py3-none-macosx_14_0_arm64.whl
Size 304.7 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
3eb8f5dd69112cd215e5ab965d9e0f65fc0e60b44a43a6c19e86eb462ebb131d
BLAKE2b-256 checksum
How to use checksums
a6e92defb25398feb3c723314a3ac3e8bdb6aa8dd77b28da3e604304333bcd41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for sqlite-tessera 1.2.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.2.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