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.create("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.list(
"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/latest/.
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.9.1.tar.gz
(19.9 kB
view details)
Built Distribution
isqlite-0.9.1-py3-none-any.whl
(33.8 kB
view details)
File details
Details for the file isqlite-0.9.1.tar.gz
.
File metadata
- Download URL: isqlite-0.9.1.tar.gz
- Upload date:
- Size: 19.9 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 | 405c2bb9c6cef1dae9a08700b612b52807f645a3a74624e781f3b943f970c0f9 |
|
MD5 | 066a93102198398a71e839bc9d262d90 |
|
BLAKE2b-256 | 8569d553dce785b9a67f8ea8ca2423695cec0d7729530a84eed020dbd11b1386 |
File details
Details for the file isqlite-0.9.1-py3-none-any.whl
.
File metadata
- Download URL: isqlite-0.9.1-py3-none-any.whl
- Upload date:
- Size: 33.8 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 | f580dad89af719953576ecca0dc1e2d1364838662a08694e35c74889ef121985 |
|
MD5 | f9173d505f2884d1cae3c144a63183c3 |
|
BLAKE2b-256 | a937ea0f479714d5511ae32d5f4b03dd77f0d0711fce43e74409c6d931a964bb |