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, 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.1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for stream_sqlite-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0f9ba5d03cf15461d63bfb9ec8e5836dbe30d4ace6efb1b1ee7be5568e2b88 |
|
MD5 | 4f0f66b83cc9af2b3c128ded04062fb7 |
|
BLAKE2b-256 | 072f2bcbe6707bacc4a7438580e2d179c237e33a5732506b3cc764b8bd7a81f3 |