Skip to main content

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.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flatwire 0.1.0
File Size Uploaded
flatwire-0.1.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flatwire 0.1.0
File Interpreter ABI Platform
flatwire-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / flatwire-0.1.0.tar.gz

Download URL flatwire-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
27915dc072144c9b1ae2c7a419cb985d6439fc64e1f030d3702c68713f1697b9
BLAKE2b-256 checksum
How to use checksums
71954df260625c4ca1dbaf6ddd90b8bc02949730472a4c2004f7764d4f918fe3
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.1.0-py3-none-any.whl

Download URL flatwire-0.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a527a2e0fe6f5dca20c08f52818178dce03995bb9236807d1d9586652efc64d7
BLAKE2b-256 checksum
How to use checksums
497b79a3101f09ca88c640791d3ee48ef31aa627ff0b7cbc21fe72c6a99b303c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.1.0

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page