Back to browse
GitHub Repository

Free-threaded HTTP library

13 starsPython

A pure Python HTTP Library built on free-threaded Python

by grandimam·Feb 27, 2026·2 points·0 comments

AI Analysis

●●SolidWizardryBig Brain

Free-threaded Python matches FastAPI's I/O throughput at 4x lower complexity.

Strengths
  • True parallelism without async/await complexity; benchmarks show 79-881% gains on I/O-bound workloads versus FastAPI
  • Minimal surface area: 465 lines of pure Python, zero C/Rust/Cython dependencies, standard library plus Pydantic only
  • Type-driven with dependency injection and Pydantic auto-parsing; honest about CPU-bound limitations (internal C locks prevent parallelism)
Weaknesses
  • Requires Python 3.13t (free-threaded), not available in production Python yet; severely limits adoption
  • Explicitly marked experimental/proof-of-concept; no path to production-ready tooling
Target Audience

Python backend developers experimenting with free-threaded Python 3.13+

Similar To

FastAPI · uvicorn · Starlette

Post Description

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%

Similar Projects