arize-phoenix-sqlean 0.1.2


pip install arize-phoenix-sqlean

  Latest version

Released: Sep 12, 2026

Project Links

Meta
Author: Anton Zhiyanov
Maintainer: Arize AI
Requires Python: >=3.10, <3.15

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers

Operating System
  • MacOS :: MacOS X
  • Microsoft :: Windows
  • POSIX

Programming Language
  • C
  • Python

Topic
  • Database :: Database Engines/Servers
  • Software Development :: Libraries :: Python Modules

arize-phoenix-sqlean

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

[!NOTE] This is a modified fork of nalgeon/sqlean.py, which was archived upstream in February 2026. It was imported at upstream commit bdd7097 and is maintained by Arize AI as part of the Phoenix monorepo. Original work by Anton Zhiyanov and contributors, zlib License. The src/ directory contains code derived from CPython's sqlite3 module (PSF License 2.0). Builds download the SQLite amalgamation (public domain) and sqlean extension sources (MIT License), which include PCRE2 (BSD 3-Clause), STC (MIT), and code based on Go's time package (BSD 3-Clause). Full notices and the CPython change summary are in THIRD_PARTY_LICENSES.

pip install arize-phoenix-sqlean
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 sqlean extensions
cur = conn.execute("select median(value) from generate_series(1, 99)")
print(cur.fetchone())
# (50.0,)

conn.close()

Extensions

This package bundles 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
  • regexp: Regular expressions
  • stats: Math statistics
  • text: String functions
  • time: High-precision date/time
  • uuid: Universally Unique IDentifiers
  • vsv: CSV files as virtual tables

Installation

pip install arize-phoenix-sqlean

Note that the package name is arize-phoenix-sqlean, while the code imports are just sqlean — the same import name as the upstream sqlean.py package, so this fork is a drop-in replacement (only one of the two can be installed in an environment).

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

  • Linux (x86_64/aarch64)
  • macOS (x86_64/arm64)
  • Windows (x86_64)

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

Prepare source files:

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

Build and test the package:

make clean build

Credits

Based on the pysqlite3 project by Charles Leifer, which is in turn based on pysqlite by Gerhard Häring. Available under the zlib license.

Wheel compatibility matrix

Platform CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14
macosx_10_15_x86_64
macosx_11_0_arm64
manylinux_2_28_aarch64
manylinux_2_28_x86_64
win_amd64
win_arm64

Files in release

arize_phoenix_sqlean-0.1.2-cp310-cp310-macosx_10_15_x86_64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp310-cp310-manylinux_2_28_aarch64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp310-cp310-win_amd64.whl (903.4KiB)
arize_phoenix_sqlean-0.1.2-cp310-cp310-win_arm64.whl (836.6KiB)
arize_phoenix_sqlean-0.1.2-cp311-cp311-macosx_10_15_x86_64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp311-cp311-manylinux_2_28_aarch64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp311-cp311-win_amd64.whl (903.4KiB)
arize_phoenix_sqlean-0.1.2-cp311-cp311-win_arm64.whl (836.6KiB)
arize_phoenix_sqlean-0.1.2-cp312-cp312-macosx_10_15_x86_64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp312-cp312-manylinux_2_28_aarch64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp312-cp312-win_amd64.whl (904.8KiB)
arize_phoenix_sqlean-0.1.2-cp312-cp312-win_arm64.whl (837.0KiB)
arize_phoenix_sqlean-0.1.2-cp313-cp313-macosx_10_15_x86_64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp313-cp313-macosx_11_0_arm64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp313-cp313-manylinux_2_28_aarch64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp313-cp313-win_amd64.whl (904.6KiB)
arize_phoenix_sqlean-0.1.2-cp313-cp313-win_arm64.whl (836.8KiB)
arize_phoenix_sqlean-0.1.2-cp314-cp314-macosx_10_15_x86_64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp314-cp314-macosx_11_0_arm64.whl (1.1MiB)
arize_phoenix_sqlean-0.1.2-cp314-cp314-manylinux_2_28_aarch64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp314-cp314-manylinux_2_28_x86_64.whl (3.1MiB)
arize_phoenix_sqlean-0.1.2-cp314-cp314-win_amd64.whl (927.6KiB)
arize_phoenix_sqlean-0.1.2-cp314-cp314-win_arm64.whl (861.3KiB)
arize_phoenix_sqlean-0.1.2.tar.gz (3.4MiB)
No dependencies