PyNest
A modern, modular Python framework inspired by NestJS, built on top of FastAPI.
Why Choose PyNest?
Modular Architecture
Organize your code into reusable modules for better scalability and maintainability.
Built on FastAPI
Leverage the speed and performance of FastAPI, one of the fastest Python web frameworks.
Type Safety
Enjoy robust type checking and autocomplete features with Python's type hints.
Community Driven
Join a growing community of developers contributing to the evolution of PyNest.
Extensible
Easily integrate with various libraries and tools to extend functionality.
Secure
Implement best security practices with built-in support for authentication and authorization.
Get Started with PyNest
from nest.core import PyNestFactory, Module, Controller, Get, Injectable
@Injectable()
class AppService:
def __init__(self):
self.app_name = "PyNest App"
self.app_version = "1.0.0"
def get_app_info(self):
return {"app_name": self.app_name, "app_version": self.app_version}
@Controller("/")
class AppController:
def __init__(self, app_service: AppService):
self.app_service = app_service
@Get("/")
def get_app_info(self):
return self.app_service.get_app_info()
@Module(controllers=[AppController], providers=[AppService])
class AppModule:
pass
app = PyNestFactory.create(
AppModule,
description="This is my PyNest app.",
title="PyNest Application",
version="1.0.0",
debug=True,
)
