π PyAA: Django and FastAPI in the same application
Over time working with Django, I noticed a recurring challenge that many developers face π. Django is excellent for building full web applications, but when a project starts to require async features, WebSockets, modern APIs and higher performance, the architecture often becomes more complex than expected β οΈ.
I ran into this problem myself.
Django continued to be a solid foundation for web applications, while FastAPI offered native async support, WebSockets and a very efficient API layer β‘. The difficulty was combining both in a simple and maintainable way, without splitting the project or increasing operational complexity.
Thatβs why I built PyAA.
PyAA allows Django and FastAPI to run together in the same application, with clear responsibilities. Django handles the website, admin, ORM, authentication and background tasks, while FastAPI focuses on async workloads, APIs, WebSockets and performance π.
This approach results in a clean and scalable architecture π. The API layer currently has around 99% test coverage, which helps ensure stability and confidence as the project evolves π§ͺ.
PyAA is open source and designed to be a practical foundation for web applications, APIs and SaaS projects built with Python.
π¦ Repository:
https://github.com/paulocoutinhox/pyaa
If you work with Django and care about async features and performance, this project may be useful to you π‘