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
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
Running tests
pip install -r requirements-dev.txt
pytest
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.2.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for stream_read_ods-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74cec4d79840d2609f18e731bdd0a1cf15055d3404e6da95f2873306624a7ec |
|
MD5 | f1a2819259328ba6b8392d149b905611 |
|
BLAKE2b-256 | 23d72c4b5c125b01643c2a2b5d5023f66f73a40b6516765e1b090b5846da6cb3 |