Simple Authentication System To kick-start your Next FastAPI Project 🚀
Share
Long description
Auth-FastAPI-Boilerplate 🦥
- This is a template for bootstrapping the FastAPI project. If you want to develop a RESTful web service using Python, you can use this template.
Features 🎉
- Based on
FastAPI
(obviously). - Dockerized Template.
- Structured into (sub)modules for easy large projects.
- Using
MongoDB
(more in future). - Easy to add custom data models.
- Typing with
Pydantic
. - Deployment using
Uvicorn
. - Token-based authentication using
PyJWT
. - Testing using
Pytest
. - Code coverage report using
pytest-cov
.
Usage 📚
- You should create a virtual environment and activate it:
python -m venv venv/
source venv/bin/activate
- And then install the development dependencies:
pip install -r requirements.txt
- I Create a simple Make file to run the application:
note: don't forget to change the APP_HOST
and SECRET_KEY
variables.
cp .env.template .env
- Then Start the application:
# start Container
make start
- You could also test the project using
make test
.
License 🍀
This project is licensed under the terms of the MIT license.