https://github.com/joumaico/sqlite7
A DB-API 2.0 style interface for SQLite databases.
https://github.com/joumaico/sqlite7
sqlite
Last synced: 24 days ago
JSON representation
A DB-API 2.0 style interface for SQLite databases.
- Host: GitHub
- URL: https://github.com/joumaico/sqlite7
- Owner: joumaico
- License: mit
- Created: 2026-04-09T13:21:50.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-09T16:04:13.000Z (3 months ago)
- Last Synced: 2026-04-09T16:05:22.179Z (3 months ago)
- Topics: sqlite
- Language: Python
- Homepage: https://sqlite7.readthedocs.io
- Size: 29.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQLite7
SQLite7 is a DB-API 2.0 style interface for SQLite databases backed directly by the SQLite C library, with both synchronous and asynchronous APIs.
## Installation
```bash
pip install sqlite7
```
**Requires:** Python 3.11+
## Quick Example
```python
from sqlite7 import connect
with open_db(":memory:") as db:
db.script(
'''
CREATE TABLE users (
id INTEGER PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
age INTEGER NOT NULL
);
'''
)
users = db.table("users")
users.insert({"email": "ada@example.com", "name": "Ada", "age": 36})
users.insert({"email": "grace@example.com", "name": "Grace", "age": 37})
rows = users.select(
columns=["id", "name"],
where="age >= ?",
params=[36],
order_by="id ASC",
limit=10,
offset=0,
)
print(rows)
```
## License
MIT License