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.tar.gz
(19.7 kB
view details)
Built Distribution
isqlite-0.9-py3-none-any.whl
(33.5 kB
view details)
File details
Details for the file isqlite-0.9.tar.gz
.
File metadata
- Download URL: isqlite-0.9.tar.gz
- Upload date:
- Size: 19.7 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 | 77cc92ce34982ac9fe4ab10d3a6780bb81f80f1403869571466075f7f8bd374a |
|
MD5 | 8a4679756d872975000a0adabcef61d7 |
|
BLAKE2b-256 | 9f63340f4549893b0a15e6e819190f67382e8e9ab1c49a7ebcd8d1a684ce38fe |
File details
Details for the file isqlite-0.9-py3-none-any.whl
.
File metadata
- Download URL: isqlite-0.9-py3-none-any.whl
- Upload date:
- Size: 33.5 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 | 243d344e26ab316ede3cab699ed5ae8247f4fd69d36dcf1cb50c9001db8cd2db |
|
MD5 | b6891cdfcceb42f45044b1acc4800cd2 |
|
BLAKE2b-256 | 511c336d75463b72d44d93de335a2a91ea854cb466607810b9c8453e30397fac |