René's minimal wrapper around Python's sqlite3 module
Project description
RenesSQLiteHelper
René's minimal wrapper around Python's built-in sqlite3 module.
Installation
pip install RenesSQLiteHelper
Usage
Create a database
The database file (Here: some-data) is stored by default under ~/.local/share/sqlite-dbs.
from RenesSQLiteHelper import open_db, bulk_load
con = open_db('some-data', deleteIfExists = True)
con.execute('''
create table tab (
id integer primary key,
val text
)
''')
Use the database
Bulk load
con = open_db('some-data')
with bulk_load(con) as cur:
cur.execute('insert into tab values (?, ?)', (42, 'hello world'))
Selecting etc
for rec in con.execute('select * from tab'):
print(f'{rec['id']}: {rec['val']}')
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 renessqlitehelper-0.2.0.tar.gz.
File metadata
- Download URL: renessqlitehelper-0.2.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea970548811ae8b5368afafd2031f1d802215be4817d628b738fc246598268f
|
|
| MD5 |
a921d10749f51d1be4076767ea87dbd9
|
|
| BLAKE2b-256 |
68b4b5c07a68fc177f154d6db637eed567a7700997a3913764861ef61490a3d9
|
File details
Details for the file renessqlitehelper-0.2.0-py3-none-any.whl.
File metadata
- Download URL: renessqlitehelper-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcbe92b06f5e9c90ca5a08c2fbc26e74c2bc0e79840e58d3578b5ee2d553cac1
|
|
| MD5 |
0dc4183b9d5d467f948c55bdcc2cf889
|
|
| BLAKE2b-256 |
f7ce52a36104d65d41f01c8ead53b4523de7a167bdbfcc4176ea70a11c47580c
|