This project is an use example of the Uncle Bob's Clean Architecture, and here we are using some dependencies:
- FastApi
- Django
- Flask
There's an abstraction called HttpServer implemented to each framework above, and this abstraction works with a controller implementing it's own route;
Also you'll see the HealthCheckUseCase and the HealthCheckController as an example/way of how implement your own routes;
- Install poetry: https://python-poetry.org/docs/#installation
- Inside the
py_clean_archdir callpoetry shellandpoetry install - Go to the
main.pyfile and choose one of the servers (FastApiHttpServer, FlaskHttpServer, DjangoHttpServer) and let the others commented: - If your chooice was the
DjangoHttpServer, run the default Django migrations inside thepy_clean_archdir using thepython infra/http/django_http_server/manage.py migratecommand; - Inside the
py_clean_archdir run the project by callingpython main.py - To check the server running make a
GETrequest to the/health_check/endpoint and you'll get it:
{"http_server": "DjangoHttpServer", "status": "running"}I hope it helps. Feel free to propose any changes.