By 2025, apart from Django, what other options are there for Python web frameworks?
It's 2025—what's left outside of Django? LiteStar is lightweight and fast, Tortoise ORM saves headaches, Granian eliminates Nginx, and Robyn combines Python with Rust. Are independent developers finally free from being forced into an unwanted bundle?
目录6 个章节
Foreword
Hello everyone, I'm Xiyuan~
A while ago, I wrote an article titled "Is Django Outdated? Thoughts from ASGI to the AI Era", discussing how traditional full-stack frameworks (like Django) should face new trends in the age of AI.
Recently, while renovating the DjangoStarter project, I did some research along the way and found that the Python Web ecosystem is evolving even faster than I imagined.
On one hand, veteran players like Django now have fresh add-ons like Ninja. On the other hand, if you choose not to follow the full-stack route of Django, there's a batch of emerging lightweight frameworks and tools that are pushing Python Web into a new phase: lightweight + async-first + Rust-powered.
So in this article, I'll talk about several new options worth watching in 2025: LiteStar, Tortoise ORM, Granian, and Robyn.
LiteStar
LiteStar is an emerging ASGI-based framework, positioned somewhat as an evolved version of FastAPI.
- Advantages: Complete type hints, natural dependency injection, and good performance.
- Disadvantages: Moving away from the Django ecosystem means you have to choose and configure ORM and admin management yourself.
- Target Audience: Independent developers and small projects that prioritize lightweight and flexibility.
When I tried it out, the biggest takeaway was that its writing style is clean and less burdened by historical baggage compared to Django.
Later on, I will use LiteStar to develop a formal project to test the waters.
I’ll share more when that happens.
Async ORM
Leaving the Django ecosystem, the thing you'll probably miss most is the ORM.
LiteStar doesn't have a built-in ORM, so which one should you choose? Personally, I recommend Tortoise ORM.
Its syntax is very similar to Django ORM.
class Event(Model):
id = fields.IntField(pk=True)
name = fields.CharField(max_length=255)
start_time = fields.DatetimeField()
Looks a bit familiar, right?
For Django users, the learning curve is very low.
- Pros: Async-native, syntax consistent with Django ORM.
- Cons: The ecosystem is not as large as Django ORM's, and community activity remains to be seen.
If you're used to Django ORM but want async/await, Tortoise ORM is a great choice.
Granian
A high-performance server powered by Rust
At the deployment level, I recently discovered a new tool: Granian.
- An ASGI server written in Rust, faster than Uvicorn/Daphne.
- Can handle static files directly, eliminating the need for Nginx in many scenarios.
- Built-in multi-worker support simplifies the deployment process.
In other words: it replaces both Daphne and Nginx at once.
I plan to use Granian in subsequent experiments with DjangoStarter to see if it can eliminate a reverse proxy layer. After all, I've been scratching my head recently over how to elegantly integrate the URL Prefix functionality into DjangoStarter's Nginx configuration 🤣
Robyn
Python syntax + Rust performance
Another noteworthy framework is Robyn. Its approach is: use Rust to write the underlying runtime and Python to provide the API layer.
This way, you get both the ease of use of Python and performance close to Node.js/Rust frameworks.
- Built-in routing, static files, and templates
- High-performance async runtime
- Developer-friendly, with a syntax similar to Flask/FastAPI
It looks like a very cool framework that combines Python's ease of use with Rust's performance. In short, it's about balancing productivity and speed, and it seems worth exploring.
Summary
The Python Web ecosystem in 2025 is no longer just about Django vs Flask vs FastAPI.
The new trends are:
- Lighter frameworks (LiteStar)
- ORM with native async support (Tortoise)
- Faster and simpler deployment layers (Granian)
- Performance powered by Rust (Robyn)
My takeaway is: Django remains important, but new frameworks have brought more possibilities for independent developers and small teams.
In the future, I plan to try out Robyn and Granian in real projects to see if the Python workflow combined with Rust performance can be effectively realized.
_EOF_
By 2025, apart from Django, what other options are there for Python web frameworks?
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
Python网络请求库,从 requests 到 httpx
Requests早该退休了,httpx这老古董才配活在异步时代?HTTP/2和超时?这些基本配置requests早该有。异步支持原生?别逗了,这年头谁还用同步。
2026-03-27 · Python · 约 1 分钟
Python接入企业微信推送信息到内部群里
前言 之前一篇文章提到了使用wechatpy库来实现企业微信应用登录:Django + Taro 前后端分离项目实现企业微信登录 其实这个库可以实现的功能非常多,基本微信开发涉及到的功能都能实现。 本文介绍一个很常用的场景:实时推送信息到企业微信群里。 安装 首先安装wechatpy库 pip install wechatpy 如果运行的时候提示需要安装其他库(比如加解密相关的)那就按照提示安装,
2022-04-08 · Python · 约 1 分钟
现代 Python 程序优雅处理日期时间的避坑指南
Python 时间处理还是得踩坑?`datetime`、`time`、`calendar` 搞得人头大,Naive vs Aware 时区陷阱更是坑爹。2026 年了还用 `pytz`?标准库 `ZoneInfo` 加上 `Pendulum`、`Arrow` 才叫现代化,至少不用再写反人类的时间字符串解析。数据库存 UTC,前端传 ISO 8601,简单点行不行?
2026-03-25 · Python · 约 1 分钟
Python踩坑:类与类对象类型参数传递与使用
前言 对初学者来说,Python确实简单好用,毕竟动态类型语言,不用定义就可以拿来用,类型之间随意转换简直不要太方便,因此Python用来写写小脚本,爬虫程序什么的,没什么问题。 不过,一旦用来开发稍微大型一点的项目,例如搭建一个Web应用,就会遇到一些问题,一般缺乏经验的人都会陷入某些坑中。= =... 坑 先说坑,函数参数类型是一坑,类与类的对象这又是一坑。 虽然之前用其他静态类型语言(例如C
2022-05-27 · Python · 约 1 分钟
讨论
共 0 条加载评论中…