A basic boilerplate configuration for creating a project that leverages the speed and simplicity of FastAPI for building APIs and the powerful Django ORM for managing database interactions. This configuration allows developers to benefit from FastAPI’s asynchronous capabilities for handling high-performance requests while taking advantage of Django's mature ORM and admin interface for database and content management.
- FastAPI for building APIs quickly and efficiently.
- Django ORM for database interactions.
- Django Admin.
- Full support to asynchronous requests with FastAPI.
-
Clone the repository:
git clone git@github.com:cpleonardo/fastapi-django-boilerplate.git cd fastapi-django-boilerplate -
Install the dependencies:
poetry install
-
Activate virtual environment:
poetry shell
-
(Optional) Create a super user:
cd src python manage.py createsuperuser -
Run the FastAPI server:
chmod +x run_server.sh ./run_server.sh
- Access the API documentation at
http://localhost:8000/docsfor Swagger UI orhttp://localhost:8000/redocfor ReDoc. - Access the Django Admin panel at
http://localhost:8000/admin.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License.