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

Follow @ohmypy on Twitter to keep up with new features 🚀

Metadata

Release files for sqlean.py 0.21.5.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 sqlean.py 0.21.5.1
File Actions
sqlean.py-0.21.5.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for sqlean.py-0.21.5.1-cp311-cp311-win_amd64.whl
sqlean.py-0.21.5.1-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.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.5.1-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.5.1-cp311-cp311-macosx_10_9_universal2.whl
sqlean.py-0.21.5.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for sqlean.py-0.21.5.1-cp310-cp310-win_amd64.whl
sqlean.py-0.21.5.1-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.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.5.1-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.5.1-cp310-cp310-macosx_10_9_universal2.whl
sqlean.py-0.21.5.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for sqlean.py-0.21.5.1-cp39-cp39-win_amd64.whl
sqlean.py-0.21.5.1-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.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.5.1-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.5.1-cp39-cp39-macosx_10_9_universal2.whl
sqlean.py-0.21.5.1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for sqlean.py-0.21.5.1-cp38-cp38-win_amd64.whl
sqlean.py-0.21.5.1-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.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.5.1-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.5.1-cp38-cp38-macosx_10_9_universal2.whl
sqlean.py-0.21.5.1-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for sqlean.py-0.21.5.1-cp37-cp37m-win_amd64.whl
sqlean.py-0.21.5.1-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.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sqlean.py-0.21.5.1-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for sqlean.py-0.21.5.1-cp36-cp36m-win_amd64.whl
sqlean.py-0.21.5.1-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.5.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Total release size: 28.9 MB

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

Download URL sqlean.py-0.21.5.1-cp311-cp311-win_amd64.whl
Size 759.5 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5fdbad8fd4962e7ef3cc71ea4e020f09d8b5382771358aa0a640f102d9161138
BLAKE2b-256 checksum
How to use checksums
067eadedd5e049090f5eb384c76f41fc9129915bf4257d67cd603f4e8d2bf4ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-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
037884d4a414f43d2e688c8273196757c4d7e398b47d2fec103084101d545843
BLAKE2b-256 checksum
How to use checksums
6bc7b4027178560f18176d2dc668dd94e3b2dc47a34a4fa943acb2ddb05bca4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-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
54b1276a38ada671ab2c2f40b10a04c4447797864467577967131f5c6b9f6751
BLAKE2b-256 checksum
How to use checksums
3533caaba9f97a5a1ef6cd86447e1567f803c4c2d02a91db656abf48f3ab1f01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp310-cp310-win_amd64.whl
Size 759.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
90c9841c943937ff181d2916d8e0494fe1d64fb0564df5901294acc9ab4235fb
BLAKE2b-256 checksum
How to use checksums
b912010ca7fb80eb7a94dcee6876cce03b1900b877eb0a0f26118b701660be32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c9ed0de84d627147ba25d97fe068474dbf42975df4ff7aed04ca5240dfd843f0
BLAKE2b-256 checksum
How to use checksums
4b23a964f6fe5f88e361fd7d8da93baeb05cb69f9e03272845d1a3bff48c105e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-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
be7130f33448724f1f288f8697a47121f8523725ce234f8ef3a72affe330e795
BLAKE2b-256 checksum
How to use checksums
e56db21ed6d0174f82f4990ec142bf1fdf21c4e5347356993a079f33d6221a51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp39-cp39-win_amd64.whl
Size 759.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
f3a1c0d08d519395ab2f5916f0b237cd48fca45b1fe472e8a2028914e686f33f
BLAKE2b-256 checksum
How to use checksums
13eb652f5bead98da55bba78a7c7c21a5a7bdb042f0417d1d3316cc5bcebb3f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
08795c9561e96a4e51d2fe3b5831820c30e99f02ff77075af2ff52b7f0953218
BLAKE2b-256 checksum
How to use checksums
f9ccc01591c0adc7916e7ee9f9f26fbd22e7b79f2b018502a9525d94db365f6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-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
9ea26ee191647e4b86f769d034368629e2df67db8c61cb5d39bcceba2998bf02
BLAKE2b-256 checksum
How to use checksums
3727cd3770cd3a7a8bee6aa0ea7f9e3de55f21da7cb02e769c0d4db49460038c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp38-cp38-win_amd64.whl
Size 759.7 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
ea6f7a6f6a83896ab76ab81140c58619dbabb7a71e7567e2e533d5378ee90be9
BLAKE2b-256 checksum
How to use checksums
657468ec56123afc6a370ff9a768a126fdbc6f11c07597af6cf64475eadc73f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d7e98c8fcfdee48808f4d4538aef65a1a48f2e4c0f842e6a46503720130150c0
BLAKE2b-256 checksum
How to use checksums
978d1bf71193457ddd9f00a0fc2650c9c8566c203bf42b803f8675f2c007f52e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-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
954bca7c722b0e1f28e39fbb69f94b0049e8d255daf728d03f42e6e15e1b135a
BLAKE2b-256 checksum
How to use checksums
9ed4fe8c352f3301663ceabb56ae4d315f3376810eaba80ee03488d3cf42b5d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp37-cp37m-win_amd64.whl
Size 759.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
20907f40637e0ceb0844c4cbca7dcafac580e621ef033e651c9def0f2dcafd46
BLAKE2b-256 checksum
How to use checksums
1ff16587f474bd32845eeea7ef696cf114fb3b0f6ed2a4c538f76a13e78a245a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bd0c80321e0fb0adbb74a4239df6640250b506a072d97dbe9d53eeb2a2a1b6e7
BLAKE2b-256 checksum
How to use checksums
a2606505931759be5387ebbe962d16d28e87358b1ed902706a49e7d28fb27fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp36-cp36m-win_amd64.whl
Size 759.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
8900954de469ae1876c5ee8e63b3bbd9a4e0e9e29a019daa2aac2f69fd3b2eea
BLAKE2b-256 checksum
How to use checksums
3a7ab424191abd40046671ea99e726f9ac10feee8cca4b5d314a2ad6af20bebc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

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

Download URL sqlean.py-0.21.5.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0f7f597ba102e56cd36192be5d7eacfe5495352e02c056afef51bb9f3caa81f8
BLAKE2b-256 checksum
How to use checksums
15156158893031490a25a2cb98a2b504a354f04ee56e1a946285fa5bbc534607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

Security for sqlean.py 0.21.5.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.

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