Settings

Theme

Show HN: A pure Python HTTP Library built on free-threaded Python

github.com

2 points by grandimam a month ago · 0 comments · 1 min read

Reader

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%

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection