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.1
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.1.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flatwire-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / flatwire-0.2.1.tar.gz
| Download URL | flatwire-0.2.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bd2a4d270ad440575cb577239f05abe38e1a3f8a267b43f9d3101e643b660a5
|
|
BLAKE2b-256 checksum How to use checksums |
adda73f76ffb45e471a77784fbbe81262d24ed72d665fe2c306b7d0d9028282c
|
| 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.1-py3-none-any.whl
| Download URL | flatwire-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
695dfd0e561bd8b85db8565be083e57f941899e59dfdb5e0c473eaf96022767f
|
|
BLAKE2b-256 checksum How to use checksums |
37f7248ed035f6a00234321cab68999b10669cf3b76507231826babac3801d8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|