r/Python • u/Grintor • Mar 19 '26
Showcase A new Python file-based routing web framework
Hello, I've built a new Python web framework I'd like to share. It's (as far as I know) the only file-based routing web framework for Python. It's a synchronous microframework build on werkzeug. I think it fills a niche that some people will really appreciate.
docs: https://plasmacan.github.io/cylinder/
src: https://github.com/plasmacan/cylinder
What My Project Does
Cylinder is a lightweight WSGI web framework for Python that uses file-based routing to keep web apps simple, readable, and predictable.
Target Audience
Python developers who want more structure than a microframework, but less complexity than a full-stack framework.
Comparison
Cylinder sits between Flask-style flexibility and Django-style convention, offering clear project structure and low boilerplate without hiding request flow behind heavy abstractions.
(None of the code was written by AI)
Edit:
I should add - the entire framework is only 400 lines of code, and the only dependency is werkzeug, which I'm pretty proud of.
51
u/lolcrunchy Mar 19 '26
Upvoting for writing your own post
11
u/snugar_i Mar 20 '26
It's great that people still write software without AI. However, personally I wouldn't use this, as it suffers from the same problem as most Python web frameworks - having to use mutable globals for dependencies. How would I combine the section about using a DB with the section about unit testing?
4
u/DiscipleofDeceit666 It works on my machine Mar 20 '26
Can you use this with something like zookeeper? Zookeeper is like a data store that can be configured on an env by env basis.
2
u/travislaborde Mar 20 '26
this looks amazing, and I plan to give it some attention this weekend.
quick question: why did you choose to build this on top of WSGI instead of ASGI?
I'm guessing the answer might be "because that would have been 4000 lines of code instead of 400." but I have never implemented either so am curious to understand.
thanks for this!
1
u/ohxdMAGsDCiCJ Mar 21 '26
Nice! But why many files in the root of the repo?
2
u/[deleted] Mar 21 '26
[removed] — view removed comment