Pu

Pure Python web framework using free-threaded Python

Hacker News

Pure Python web framework using free-threaded Python

Barq is an experimental HTTP framework built entirely in pure Python, designed for free-threaded Python 3.13 (PEP 703). No async/await, no C extensions - just threads with true parallelism. The question I wanted to answer: now that Python has a no-GIL mode, can a simple threaded server beat async frameworks? Results against FastAPI (100 concurrent clients): - JSON: 8,400 req/s vs 4,500 req/s (+87%) - CPU-bound: 1,425 req/s vs 266 req/s (+435%) The CPU-bound result is the interesting one. Async can't parallelize CPU work - it's fundamentally single-threaded. With free-threaded Python, adding more threads actually scales: - 4 threads: 608 req/s - 8 threads: 1,172 req/s (1.9x) - 16 threads: 1,297 req/s (2.1x) The framework is ~500 lines across 5 files. Key implementation choices: - ThreadPoolExecutor for workers - HTTP/1.1 keep-alive connections - Radix tree router for O(1) matching - Pydantic for validation - Optional orjson for faster serialization This is experimental and not production-ready, but it's an interesting datapoint for what's possible when Python drops the GIL. Code: https://github.com/grandimam/barq

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: para · Missing: supports, reddit linkedin, podcasting
56%56% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsMay not resonate with HN audience · Strong signals: io · Missing: https docs, excited, just released
48%48% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
48%48% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: para · Missing: mobile apps, ios, personal
48%48% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Product HuntUnlikely to reach the leaderboard · Strong signals: single, using, code · Missing: mac, agents, macos
30%30% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
21%21% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Fe
Feather a Python Web Framework64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Feather a Python Web Framework

Hacker News4
St
Starlette – An asyncio Web framework for Python64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Starlette – An asyncio Web framework for Python

Hacker News8
I
I made a fronted web framework in Python64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I made a fronted web framework in Python

Hacker News2
Pu
Pure Python SHA1 and MD4 Implementations60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pure Python SHA1 and MD4 Implementations

Hacker News2
A
A pure Python implemention of Apache Thrift48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A pure Python implemention of Apache Thrift

Hacker News64
Gr
Graphene – GraphQL framework for Python76%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Graphene – GraphQL framework for Python

Hacker News106
Ki
Kim – A Python serialization and marshaling framework46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kim – A Python serialization and marshaling framework

Hacker News136
Tr
TriOTP, the OTP Framework for Python Trio59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TriOTP, the OTP Framework for Python Trio

Hacker News5
Wa
Watson – A Python 3 Framework59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Watson – A Python 3 Framework

Hacker News1
I
I built a Python web framework69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I built a Python web framework

Hacker News173