sqlean.py
sqlite3 with extensions
What it is and what it does
sqlean.py wraps SQLite with a collection of optional extensions that add domain-specific SQL functions. It maintains full API compatibility with Python's standard sqlite3 module, so you can use it as a direct replacement without rewriting connection or query code. The extensions—covering cryptography, fuzzy matching, statistics, regex, file I/O, IP address handling, and more—are disabled by default but can be enabled globally or selectively before opening a connection.
The package is distributed as precompiled wheels for Linux and macOS, making installation straightforward on those platforms. However, the repository is archived and no longer maintained, which means bug fixes and compatibility updates with future Python or SQLite versions are unlikely. The codebase is based on pysqlite3 and is available under a permissive zlib license.
Use it for:
- Add statistical functions (median, percentiles) to SQLite queries without external dependencies.
- Perform fuzzy string matching and phonetic searches directly in SQL.
- Hash and encode data using crypto functions within SQL expressions.
- Parse and manipulate IP addresses as part of SQL queries.
- Read and write files from SQL using fileio extension functions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A drop-in replacement for Python's sqlite3 module that bundles sqlean extensions, adding cryptography, fuzzy matching, statistics, regex, file I/O, and other SQL functions directly into SQLite.
Yes, if you are on Linux or macOS and need sqlean extensions in a Python SQLite environment. The permissive license and zero runtime dependencies make it low-risk. However, the abandoned repository status means you should not rely on it for long-term production systems expecting active maintenance or future Python compatibility patches. Windows users will need to build from source.
Install
sqlean-py on PyPI
pip
pip install sqlean-pyuv
uv add sqlean-pypoetry
poetry add sqlean-pyInstalling sqlean.py
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Linux and macOS (x86_64/aarch64) but not Windows. Repository is archived and marked abandoned as of the fact sheet date, with no active maintenance.
License in practice
Licensed under zlib/libpng (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install sqlean.py
import sqlean
sqlean.extensions.enable_all()
conn = sqlean.connect(":memory:")
result = conn.execute("select median(value) from generate_series(1, 99)").fetchone()
conn.close()
No Windows wheels available; requires Python 3.9 or later; requires manual build on unsupported platforms.
Verify before relying
- Whether the abandoned status affects long-term compatibility with future Python or SQLite versions.
- Whether the 293 days since last release indicates sufficient stability or potential staleness for production use.
Package facts
| License | zlib/libpng (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 293 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 1,186,871/month — #4,249 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sqlean_py-3.50.4.5-cp310-cp310-macosx_10_15_x86_64.whl; sqlean_py-3.50.4.5-cp310-cp310-macosx_11_0_arm64.whl; sqlean_py-3.50.4.5-cp310-cp310-manylinux_2_28_aarch64.whl; sqlean_py-3.50.4.5-cp310-cp310-manylinux_2_28_x86_64.whl; sqlean_py-3.50.4.5-cp311-cp311-macosx_10_15_x86_64.whl; sqlean_py-3.50.4.5-cp311-cp311-macosx_11_0_arm64.whl; sqlean_py-3.50.4.5-cp311-cp311-manylinux_2_28_aarch64.whl; sqlean_py-3.50.4.5-cp311-cp311-manylinux_2_28_x86_64.whl; sqlean_py-3.50.4.5-cp312-cp312-macosx_10_15_x86_64.whl; sqlean_py-3.50.4.5-cp312-cp312-macosx_11_0_arm64.whl; sqlean_py-3.50.4.5-cp312-cp312-manylinux_2_28_aarch64.whl; sqlean_py-3.50.4.5-cp312-cp312-manylinux_2_28_x86_64.whl; sqlean_py-3.50.4.5-cp313-cp313-macosx_10_15_x86_64.whl; sqlean_py-3.50.4.5-cp313-cp313-macosx_11_0_arm64.whl; sqlean_py-3.50.4.5-cp313-cp313-manylinux_2_28_aarch64.whl; sqlean_py-3.50.4.5-cp313-cp313-manylinux_2_28_x86_64.whl; sqlean_py-3.50.4.5-cp314-cp314-macosx_10_15_x86_64.whl; sqlean_py-3.50.4.5-cp314-cp314-macosx_11_0_arm64.whl; sqlean_py-3.50.4.5-cp314-cp314-manylinux_2_28_aarch64.whl; sqlean_py-3.50.4.5-cp314-cp314-manylinux_2_28_x86_64.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pysqlite3pysqlite3 packages SQLite as a standalone…
permissive · top 15,000 on PyPI
pysqlite3-binaryProvides a self-contained SQLite database…
permissive · top 5,000 on PyPI
sqlcipher3-wheelsProvides a Python DB-API 2.0 interface to…
permissive · top 15,000 on PyPI
sqlcipher3sqlcipher3 is a Python DB-API 2.0 interface to…
permissive · top 15,000 on PyPI
sqlcipher3-binaryA Python DB-API 2.0 interface to SQLCipher,…
permissive · top 15,000 on PyPI
sqlite-fts4Registers custom SQLite functions for ranking…
permissive · top 5,000 on PyPI
fudgeofudgeo creates and manages OGC…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-sqlite3Adds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
sqlalchemy-mateSimplifies SQLAlchemy code with helper…
permissive · top 5,000 on PyPI
pgvecto-rsProvides Python bindings for PGVecto.rs, a…
permissive · top 15,000 on PyPI