flatwire (Python)
Streaming JSON serialization that keeps memory flat and time linear — stream large collections element-by-element instead of materializing the whole payload.
pip install flatwire
import flatwire
# Whole-value convenience (byte-compatible with the standard library).
data = flatwire.encode({"hello": "world"})
value = flatwire.decode(data)
# Stream a large collection to a binary writer, one element at a time.
with open("out.json", "wb") as fp:
flatwire.encode_array((row for row in huge_iterator), fp)
# Read it back lazily — peak memory is one element, not the whole array.
with open("out.json", "rb") as fp:
for row in flatwire.decode_array(fp):
handle(row)
Wire format is plain JSON, so nothing downstream changes. See the monorepo README for the cross-language story and benchmarks.
Apache-2.0.
Metadata
Release files for flatwire 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flatwire-0.2.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flatwire-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / flatwire-0.2.0.tar.gz
| Download URL | flatwire-0.2.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1bfe72e6aeefda403c07ac1916dbcdef4fdcc369cdcb6f38490c43074694da8
|
|
BLAKE2b-256 checksum How to use checksums |
9714a699a8c041f298b674ba5de40580c6a923ab8a6721dc63b665676c4e11a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / flatwire-0.2.0-py3-none-any.whl
| Download URL | flatwire-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4e4614e167fe159996aaf05a3d6779a59f5dc830b554299af81163c421b83c7
|
|
BLAKE2b-256 checksum How to use checksums |
54ba82c6cabc4343bd289489a316b4f5dc015abfd1fcd56ba0912a690a07f961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|