Python function to construct an ODS spreadsheet on the fly - without having to store the entire file in memory or disk
Project description
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 |
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
Built Distribution
File details
Details for the file stream-write-ods-0.0.2.tar.gz
.
File metadata
- Download URL: stream-write-ods-0.0.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7afabce4c0863b6b55086536e42dc022c94277a305c96be129c7ccf646c0bf30
|
|
MD5 |
b13087128218b089cfe2b05872b506f9
|
|
BLAKE2b-256 |
d1de379cdb5052e5353f2d4dd682d189e1a4ab3ad7b30a6483c64f70d57bf596
|
File details
Details for the file stream_write_ods-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: stream_write_ods-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
28bf60b3fa8ac3775d704253ecedfb840dbd35b1d663737e2838ab7fa34a11ab
|
|
MD5 |
15299f467d4c21089890243e26e7a454
|
|
BLAKE2b-256 |
c5c301a79fa6e10f256af42834568aa953d9f752d9170e423c6a21b259107f70
|