An improved Python interface to SQLite
Project description
WARNING: This project is no longer maintained. It is recommended that you use a proper ORM like SQLAlchemy or Django's ORM instead.
isqlite
isqlite is an improved Python interface to SQLite. It has a more convenient API, support for schema diffing and 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 with automatic schema diffing
- A command-line interface
Installation
Install isqlite with Pip:
$ pip install isqlite
Documentation
Comprehensive documentation, including an API reference, is available at https://isqlite.readthedocs.io/en/stable/.
Version history
Version 1.0.0 of isqlite was released on October 17, 2021, after six months of development. isqlite adheres to semantic versioning, and detailed information about individual releases can be viewed in the change log.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isqlite-1.6.0.tar.gz.
File metadata
- Download URL: isqlite-1.6.0.tar.gz
- Upload date:
- Size: 25.3 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 |
3ee1cd1a53999557f1a5a10be738abd8d222dfdf796cce2abcf2c140ab843a0f
|
|
| MD5 |
65b1ec8dd28304f887ba9a41e131d05b
|
|
| BLAKE2b-256 |
66b0b24d1fe6bcf2bd032a91a5cc7b9174e82d09cf75160bdf6da2d540c0a182
|
File details
Details for the file isqlite-1.6.0-py3-none-any.whl.
File metadata
- Download URL: isqlite-1.6.0-py3-none-any.whl
- Upload date:
- Size: 50.2 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 |
7f7c8f196342fc8d941444aa8cf44da6762e94b1f92f09f2743a91d084ca4e86
|
|
| MD5 |
2f8e1240e9d720f2abded9c16694cbd0
|
|
| BLAKE2b-256 |
096b142edea2624f9d9a63f3e90c02daa1b2685bfaa5e3b5a1a7acb2b2710124
|