Skip to content

Loadable ICU extension for sqlite as python package

License

Notifications You must be signed in to change notification settings

karlb/sqlite-icu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlite-icu

This python package includes a loadable icu extension module for sqlite. This allows other python packages to use this extension without requiring dependencies outside of the python ecosystem. For more details on the extension itself, see the official documentation.

Installation

Latest Release

Install the sqlite-icu package from pypi.

Current Development Version

Install via pip

pip install git+git://github.com/karlb/sqlite-icu

or add this to you requirements.txt:

git+git://github.com/karlb/sqlite-icu

Usage

import sqlite3
import sqlite_icu

conn = sqlite3.connect(":memory:")
conn.enable_load_extension(True)
conn.load_extension(sqlite_icu.extension_path().replace('.so',''))

# now use as described in https://www.sqlite.org/icu.html
assert conn.execute("SELECT upper('i', 'tr_TR')").fetchone() == ('İ',)

See Also

About

Loadable ICU extension for sqlite as python package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published