stream-write-ods

Python function to construct an ODS spreadsheet on the fly - without having to store the entire file in memory or disk
Installation
pip install stream-write-ods
Usage
def get_sheets():
def get_rows_of_sheet_1():
yield 'Value A', 'Value B'
yield 'Value C', 'Value D'
yield 'Sheet 1 name', ('col_1_name', 'col_2_name'), get_rows_of_sheet_1()
def get_rows_of_sheet_2():
yield 'col_1_value',
yield 'Sheet 2 name', ('col_1_name',), get_rows_of_sheet_2()
ods_chunks = stream_write_ods(get_sheets())
Types
There are 8 possible data types in an Open Document Spreadsheet: boolean, currency, date, float, percentage, string, time, and void. 4 of these can be output by stream-write-ods, chosen automatically according to the following table.
| Python type | ODS type |
|---|---|
| boolean | boolean |
| date | date - without time component |
| datetime | date - with time component |
| int | float |
| float | float |
| str | string |
| NoneType | string - as #NA |
Release files for stream-write-ods 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stream-write-ods-0.0.2.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stream_write_ods-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / stream-write-ods-0.0.2.tar.gz
| Download URL | stream-write-ods-0.0.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7afabce4c0863b6b55086536e42dc022c94277a305c96be129c7ccf646c0bf30
|
|
BLAKE2b-256 checksum How to use checksums |
d1de379cdb5052e5353f2d4dd682d189e1a4ab3ad7b30a6483c64f70d57bf596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / stream_write_ods-0.0.2-py3-none-any.whl
| Download URL | stream_write_ods-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28bf60b3fa8ac3775d704253ecedfb840dbd35b1d663737e2838ab7fa34a11ab
|
|
BLAKE2b-256 checksum How to use checksums |
c5c301a79fa6e10f256af42834568aa953d9f752d9170e423c6a21b259107f70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|