Hacker News new | ask | show | jobs
Show HN: A pure Python HTTP Library built on free-threaded Python (github.com)
2 points by grandimam 109 days ago
Hey HN,

I built a small HTTP framework to experiment with free-threaded and wanted to share some observations. Barq is ~500 lines of pure Python, no C extensions, no Rust, no Cython. It uses only the standard library plus Pydantic.

Benchmarks (Barq 4 threads vs FastAPI 4 worker processes):

- JSON: Barq 10,114 req/s vs FastAPI 5,665 req/s → Barq +79%

- DB query: Barq 9,962 req/s vs FastAPI 1,015 req/s → Barq +881%

- CPU bound: Barq 879 req/s vs FastAPI 1,231 req/s → FastAPI +29%