Python function to extract all the rows from a SQLite database, without loading the entire file into memory or disk
Project description
stream-sqlite
Work in progress. This README serves as a rough design spec
Usage
from stream_sqlite import stream_sqlite
import httpx
def sqlite_bytes():
# Iterable that yields the bytes of a sqlite file
with httpx.stream('GET', 'https://www.example.com/my.sqlite') as r:
yield from r.iter_bytes(chunk_size=65536)
# A table is not guarenteed to be contiguous in a sqlite file, so can appear
# multiple times while iterating
for table_name, table_info, rows in stream_sqlite(sqlite_bytes()):
for row in rows:
print(row)
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
stream-sqlite-0.0.7.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for stream_sqlite-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7dae1b6443ee8a559c4587e5b875137350a14585f822d473c7acf548e520897 |
|
MD5 | 684d7b64e9867816e3fcfdae862ba368 |
|
BLAKE2b-256 | 6533637ffb0add55d0577b65737b04b92a006ffc24833a1282eab508a0d31578 |