If you are looking for a NestJS-like framework for Python, this is the one I built. NestJS gives a TypeScript backend a clear shape: modules, controllers, providers, guards, pipes and interceptors. When I moved back to Python I missed that shape. FastAPI is excellent, but it deliberately leaves the project structure to you, so every team ends up inventing its own.
Austial keeps the NestJS structure and runs on FastAPI and Pydantic. I maintain it, so treat this as a project write-up rather than a neutral review.
NestJS for Python: the same ideas
A controller looks the way a NestJS developer expects. Dependencies arrive through the constructor and are resolved from type hints:
@Controller("cats")
class CatsController:
def __init__(self, cats_service: CatsService):
self.cats_service = cats_service
@Get(":id")
@UseGuards(ApiKeyGuard)
async def find_one(self, id: int):
return self.cats_service.find_one(id)
The request pipeline is the one you know: guards, pipes, interceptors, the handler, then exception filters.
There is a full table of NestJS concepts and their Austial equivalents: @Module, @Injectable, CanActivate, PipeTransform, Test.create_testing_module and the CLI.
NestJS vs FastAPI: what stays FastAPI
Every route is registered as a real FastAPI APIRouter. Pydantic validates input, and /docs and /openapi.json keep working. Austial adds structure; it does not replace the server.
If you are weighing the options, I wrote a side-by-side NestJS vs FastAPI comparison covering language, structure, dependency injection, validation and testing, and a shorter note on when plain FastAPI is enough.
Dependency injection in Python, by constructor
FastAPI injects dependencies as function parameters with Depends(). NestJS and Austial inject them into a class constructor and let a container resolve them from type hints. The second style scales better when many handlers share the same services, because the wiring lives in one module instead of every route. More on constructor-based dependency injection in Python, including scopes and custom providers.
A FastAPI project structure that scales
A new project gets one folder per concern: the root module and feature modules under src/app/, shared guards and services under src/shared/, and non-Python assets such as email templates under src/templates/.
The reasoning behind it is in a FastAPI project structure that scales.
Migrating from NestJS to Python
Because the structure carries over, a port is mostly translating syntax and libraries rather than redesigning. I put the order that works, a task-by-task mapping and a worked controller into a guide on migrating from NestJS to Python.
What does not carry over
Austial is not a 1:1 port of NestJS. There is no RxJS (interceptors are plain async code), FastAPI is the only HTTP platform, the built-in ORM supports PostgreSQL and SQLite, and GraphQL is code-first through Strawberry. Module visibility is opt-in with strict_modules=True. The docs list the gaps.
Try it
uv tool install austial
austial new my-app
cd my-app && uv sync && uv run austial serve
The First Steps page walks through the scaffold. The package is on PyPI and the source is on GitHub, MIT licensed, Python 3.11+.
FAQ
Is there a NestJS-like framework for Python?
Yes. Austial is a NestJS-style web framework for Python, built on FastAPI, with modules, controllers, providers, constructor-based dependency injection, guards, pipes, interceptors, a CLI and a testing module.
What is the NestJS equivalent in Python?
There is no official NestJS port. Austial is the closest match: it keeps NestJS's module, controller and provider structure and request pipeline, and runs on FastAPI instead of Express or Fastify.
Does Austial replace FastAPI?
No. It runs on FastAPI, so FastAPI's OpenAPI schema and the Swagger UI at /docs keep working.
It is new and in beta. I would love feedback on the module system and on what is missing for your use case.



Top comments (1)
Nice! Framework.