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.1.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for stream_read_ods-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e6682dab87f33269369a4db8aba6c440f3ce5e23548617771922a90bad96333 |
|
MD5 | 2cf9e77dd1721a46bc092f24e5828b1c |
|
BLAKE2b-256 | ebb59e09803c1cb863b3163d46a340267d4f814eb032974012702137eff017bb |