An improved Python interface to SQLite
Project description
isqlite
isqlite is an improved Python interface to SQLite. It has a more convenient API, support for database migrations, and a command-line interface.
from isqlite import Database
with Database(":memory:") as db:
pk = db.insert("employees", {"name": "John Doe", "age": 30})
person = db.get_by_pk("employees", pk)
print(person["name"], person["age"])
db.update_by_pk("employees", pk, {"age": 35})
employees = db.select(
"employees",
where="name LIKE :name_pattern AND age > 40",
values={"name_pattern": "John%"},
)
pairs = db.sql(
"""
SELECT
teams.name, employees.name
FROM
employees
INNER JOIN
teams
ON
employees.team = teams.id
"""
)
Features
- A convenient Python API
- Database migrations
- A command-line interface
Installation
Install isqlite with Pip:
$ pip install isqlite
Documentation
Comprehensive documentation, including the API reference, is available at https://isqlite.readthedocs.io/en/stable/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
isqlite-0.13.1.tar.gz
(22.5 kB
view details)
Built Distribution
isqlite-0.13.1-py3-none-any.whl
(47.7 kB
view details)
File details
Details for the file isqlite-0.13.1.tar.gz
.
File metadata
- Download URL: isqlite-0.13.1.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53aba1f34394e63089f1a95553dd91ed2574b9893a439c316cbc3be741ed68b4 |
|
MD5 | 862952b51f7d9d2d3b6a12b4271b1cc8 |
|
BLAKE2b-256 | 9eaf3d17560086ea632219f28c19a4a37510b6921ee1eb26ad2e280f78130d74 |
File details
Details for the file isqlite-0.13.1-py3-none-any.whl
.
File metadata
- Download URL: isqlite-0.13.1-py3-none-any.whl
- Upload date:
- Size: 47.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f679f1a6e8e0ffcf2dd70d3eaf76fdcbaf0808ff7a54e38f540db7795c1f83 |
|
MD5 | c77f647d5a98bc00efdb4f37a228e5df |
|
BLAKE2b-256 | 6905fad6783213cf6fbb530146418b1817cf6ee8e596bae9c30a7514646f10ef |