Skip to main content

sqlean.py

This package provides an SQLite Python wrapper bundled with sqlean extensions. It's a drop-in replacement for the standard library's sqlite3 module.

pip install sqlean.py
import sqlean

# enable all extensions
sqlean.extensions.enable_all()

# has the same API as the default `sqlite3` module
conn = sqlean.connect(":memory:")
conn.execute("create table employees(id, name)")

# and comes with the `sqlean` extensions
cur = conn.execute("select median(value) from generate_series(1, 99)")
print(cur.fetchone())
# (50.0,)

conn.close()

Extensions

sqlean.py contains 12 essential SQLite extensions:

  • crypto: Hashing, encoding and decoding data
  • define: User-defined functions and dynamic SQL
  • fileio: Reading and writing files
  • fuzzy: Fuzzy string matching and phonetics
  • ipaddr: IP address manipulation
  • math: Math functions
  • regexp: Regular expressions
  • stats: Math statistics
  • text: String functions
  • unicode: Unicode support
  • uuid: Universally Unique IDentifiers
  • vsv: CSV files as virtual tables

Installation

A binary package (wheel) is available for the following operating systems:

  • Windows (64-bit)
  • Linux (64-bit)
  • macOS (both Intel and Apple processors)
pip install sqlean.py

Note that the package name is sqlean.py, while the code imports are just sqlean. The sqlean package name was taken by some zomby project and the author seemed to be unavailable, so I had to add the .py suffix.

Usage

All extensions are disabled by default. You can still use sqlean as a drop-in replacement for sqlite3:

import sqlean as sqlite3

conn = sqlite3.connect(":memory:")
cur = conn.execute("select 'sql is awesome'")
print(cur.fetchone())
conn.close()

To enable all extensions, call sqlean.extensions.enable_all() before calling connect():

import sqlean

sqlean.extensions.enable_all()

conn = sqlean.connect(":memory:")
cur = conn.execute("select median(value) from generate_series(1, 99)")
print(cur.fetchone())
conn.close()

To enable specific extensions, call sqlean.extensions.enable():

import sqlean

sqlean.extensions.enable("stats", "text")

conn = sqlean.connect(":memory:")
cur = conn.execute("select median(value) from generate_series(1, 99)")
print(cur.fetchone())
conn.close()

Building from source

For development purposes only.

Prepare source files:

make prepare-src
make download-sqlite
make download-sqlean

Build and test the package:

make clean
python setup.py build_ext -i
python -m test
python -m pip wheel . -w dist

Credits

Based on the pysqlite3 project. Available under the Zlib license.

Stay tuned

Subscribe to stay on top of new features 🚀

Metadata

Release files for sqlean.py 0.21.8.3

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 sqlean.py 0.21.8.3
File Actions
sqlean.py-0.21.8.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for sqlean.py-0.21.8.3-cp312-cp312-win_amd64.whl
sqlean.py-0.21.8.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.8.3-cp312-cp312-macosx_10_9_universal2.whl CPython 3.12 CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64) Details for sqlean.py-0.21.8.3-cp312-cp312-macosx_10_9_universal2.whl
sqlean.py-0.21.8.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for sqlean.py-0.21.8.3-cp311-cp311-win_amd64.whl
sqlean.py-0.21.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.8.3-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details for sqlean.py-0.21.8.3-cp311-cp311-macosx_10_9_universal2.whl
sqlean.py-0.21.8.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for sqlean.py-0.21.8.3-cp310-cp310-win_amd64.whl
sqlean.py-0.21.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.8.3-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details for sqlean.py-0.21.8.3-cp310-cp310-macosx_10_9_universal2.whl
sqlean.py-0.21.8.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for sqlean.py-0.21.8.3-cp39-cp39-win_amd64.whl
sqlean.py-0.21.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.8.3-cp39-cp39-macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) Details for sqlean.py-0.21.8.3-cp39-cp39-macosx_10_9_universal2.whl
sqlean.py-0.21.8.3-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for sqlean.py-0.21.8.3-cp38-cp38-win_amd64.whl
sqlean.py-0.21.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.8.3-cp38-cp38-macosx_10_9_universal2.whl CPython 3.8 CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) Details for sqlean.py-0.21.8.3-cp38-cp38-macosx_10_9_universal2.whl
sqlean.py-0.21.8.3-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for sqlean.py-0.21.8.3-cp37-cp37m-win_amd64.whl
sqlean.py-0.21.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.8.3-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for sqlean.py-0.21.8.3-cp36-cp36m-win_amd64.whl
sqlean.py-0.21.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details for sqlean.py-0.21.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Total release size: 34.7 MB

Release files / sqlean.py-0.21.8.3-cp312-cp312-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp312-cp312-win_amd64.whl
Size 770.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
d38f179eb947ff9b35d017ab56496dabf21cf43bb1b838e86f2eb36c5ff73f12
BLAKE2b-256 checksum
How to use checksums
af4b4f4ffdb27444213b9abfd258502bb9b5eb8209ae69f5e4c1dfa853c52f08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6a6636ad454c54959c71d2a795277c43dc0e1334766316b2796b60042a12197d
BLAKE2b-256 checksum
How to use checksums
c60105cf5550d692d2a7fbbeb8b9a7714f14963cf2c6e23b0416a7250d6bfd6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp312-cp312-macosx_10_9_universal2.whl

Download URL sqlean.py-0.21.8.3-cp312-cp312-macosx_10_9_universal2.whl
Size 1.8 MB
Tags CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
385a3dcae3fd39a6b5cfcbb6209e23a2bc06875dbaf38f587ea8f7cabc9b9d81
BLAKE2b-256 checksum
How to use checksums
3aca684001d8e5fca4a6a122fc808e808f3e03b0c52214d9c11a13c94e8eb4d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp311-cp311-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp311-cp311-win_amd64.whl
Size 769.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2282b4665bc3f8b624e87f8a1cbd7c9f1fe75e69cc7f6dbb5ab363600225c31c
BLAKE2b-256 checksum
How to use checksums
892b634a19ff9fa94791af31c1f267029c9f8b2660ff02321fe91d466e8eeddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f9a955f061d91fb32324ccf568bc405f777b41ed8bddd0e556e02069fd523792
BLAKE2b-256 checksum
How to use checksums
931f037cb18384631235812eb4a436fa2be3a967fc7312ba85d0e3d50d6c1ad2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp311-cp311-macosx_10_9_universal2.whl

Download URL sqlean.py-0.21.8.3-cp311-cp311-macosx_10_9_universal2.whl
Size 1.8 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
eb8712feedf39e56eba080adf6cf52bd2f2b15cf8355a6b9c84f3ebb75371bbe
BLAKE2b-256 checksum
How to use checksums
1606bc3ab8a54d0bd7038cae9b555a86b3d66de7eca1596cf812391e992c28a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp310-cp310-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp310-cp310-win_amd64.whl
Size 769.4 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
35a564626acc3dce792cb7cf601e4db8deaf6d2db3159c3f4436c12a64d5974f
BLAKE2b-256 checksum
How to use checksums
246168a7246ab8e50eb28d5fb8a32bfc55d8e13dfe5af96fe7d3a56b838082ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
740aee63a0c0b9cdff12e7017da0610f5d006d83fd2c66b82a0615eeb4a12347
BLAKE2b-256 checksum
How to use checksums
23acf5282b65802e4f85e9d1d70af40afa8d3a62d57861604d224f768426a7e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp310-cp310-macosx_10_9_universal2.whl

Download URL sqlean.py-0.21.8.3-cp310-cp310-macosx_10_9_universal2.whl
Size 1.8 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
b586ec34dec8a75754862ee1ea2147324748223b7b8199de7630976930998a75
BLAKE2b-256 checksum
How to use checksums
9de8efd32fca20064814018f227feab132881d62400221cd4c703bcf5dad1c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp39-cp39-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp39-cp39-win_amd64.whl
Size 769.6 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0511366a1c03ad7fdf1fdea21ea482322c8079923b18c17aaf47f2420e85b151
BLAKE2b-256 checksum
How to use checksums
a0a9c9ae1e5992e2ecd8f4174bf32b165c914ecaba2e4fe4f6a26536a7f0301a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
aea106857261ada09e9cae65614417464007780c176fd4f54ae5360efdda1a02
BLAKE2b-256 checksum
How to use checksums
d45d798de4e7979be57123e0716f4af3b225f368617b1508d2c878afc19ef47c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp39-cp39-macosx_10_9_universal2.whl

Download URL sqlean.py-0.21.8.3-cp39-cp39-macosx_10_9_universal2.whl
Size 1.8 MB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
0f6ca9a996cf3800d4554fb063226863bf6700fdcc14276bd1e5897e172a071a
BLAKE2b-256 checksum
How to use checksums
b5a0f64b5b38905f49148faa706ea4dd229a3840754bb0314868d0480b0cf460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp38-cp38-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp38-cp38-win_amd64.whl
Size 769.6 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
657b569671dc2856d528c7394b73ecf3ab296bd169a3d43d2d83fbc3088fb3c4
BLAKE2b-256 checksum
How to use checksums
a4668861987a2981ed185c67d1cbfab7669b5b9d16608479e4a2ddcfa394a89e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d69040c4d381744f12a14d6b3905fd52dad4af4462bf4c1217c232fbdd665548
BLAKE2b-256 checksum
How to use checksums
369ba8a5e45039f977dec843d448318266b9efdbd07f7c8933e30c4a48469768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp38-cp38-macosx_10_9_universal2.whl

Download URL sqlean.py-0.21.8.3-cp38-cp38-macosx_10_9_universal2.whl
Size 1.8 MB
Tags CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
615f6259f892a230c2a61cdd7e816a275e9096d73012d42d1e97b578202edeb2
BLAKE2b-256 checksum
How to use checksums
2589305fa3863e672fc388ad9020cd7ddf2f63ad72c8fc6a081c493f77375586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp37-cp37m-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp37-cp37m-win_amd64.whl
Size 769.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c8363de18a7d5046860c2fb6140013735993efdc87d195ed22ee0b0039175ceb
BLAKE2b-256 checksum
How to use checksums
1a2bf74c5f6210d7f9d60809b9dba2f716338f9110fad64763e1fa29dc51aea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3bf4966f43d8f3564e271f092dd785e86d285e0e339f8156827ae8ff7341f944
BLAKE2b-256 checksum
How to use checksums
271da2272dc36b0cc7b7f22d6de29011be1ce464f3f7b5a7698befbcc480256e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp36-cp36m-win_amd64.whl

Download URL sqlean.py-0.21.8.3-cp36-cp36m-win_amd64.whl
Size 769.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
4710ee796b511a2cae1fbb55c0de9c67871f39764ea4a32b37b16e9b5c8f9834
BLAKE2b-256 checksum
How to use checksums
d7eefcfd493f6c93fa37773403fca9160b685ba933e7233f9139e1daee710a69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / sqlean.py-0.21.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sqlean.py-0.21.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
2a0d2df00d6a9359a3c1b1a2cd9fe6dce00f15d36650042cabdfdc8e79235b9e
BLAKE2b-256 checksum
How to use checksums
535fc8e17eecde1baf158a28681933cae13677da589445d09eee8aacb790466f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Security for sqlean.py 0.21.8.3

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.

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