Show HN: Python file streaming 237MB/s on $8/M droplet in 507 lines of stdlib

3 b_llc 0 8/19/2025, 2:02:22 PM bellone.com ↗
Quick Links:

- PyPI: https://pypi.org/project/axon-api/

- GitHub: https://github.com/b-is-for-build/axon-api

- Deployment Script: https://github.com/b-is-for-build/axon-api/blob/master/examp...

Axon is a 507-line, pure Python WSGI framework that achieves up to 237MB/s file streaming on $8/month hardware. The key feature is the dynamic bundling of multiple files into a single multipart stream while maintaining bounded memory (<225MB). The implementation saturates CPU before reaching I/O limits.

Technical highlights:

- Pure Python stdlib implementation (no external dependencies)

- HTTP range support for partial content delivery

- Generator-based streaming with constant memory usage

- Request batching via query parameters

- Match statement-based routing (eliminates traversal and probing)

- Built-in sanitization and structured logging

The benchmarking methodology uses fresh Digital Ocean droplets with reproducible wrk tests across different file sizes. All code and deployment scripts are included.

Comments (0)

No comments yet