Python function to extract data from an ODS spreadsheet on the fly - without having to store the entire file in memory or disk
Project description
stream-read-ods
Python function to extract data from an ODS spreadsheet on the fly - without having to store the entire file in memory or disk
Work in progress. This README serves as a rough design spec
Installation
pip install stream-read-ods
Usage
from stream_read_ods import stream_read_ods
import httpx
def ods_chunks():
# Iterable that yields the bytes of an ODS file
with httpx.stream('GET', 'https://www.example.com/my.ods') as r:
yield from r.iter_bytes(chunk_size=65536)
for name, rows in stream_read_ods(ods_chunks()):
print(name) # Sheet name
for row in rows:
print(row) # Tuple of cells
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-read-ods-0.0.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for stream_read_ods-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94b276ddbeaa04f7abaee4fbefe4cb2ab4b3494d702e00af23b4465e78a8e8e9 |
|
MD5 | c1fa3a722218fcd6454d9170cfd50816 |
|
BLAKE2b-256 | b8cce11132e63d4c172de5626e7fa7cff7aa3a34200abad8daa1d79ea7d861ca |