A Boilerplate FastApi project
- Boilerplate project structure
- Asynchronous API
- User login and Authentication
- MongoDb
- CRUD endpoints
- Travis CI configuration before deploy
- API testing with
pytest
- Pipenv dependency management
- Docker containerization and deploy to Heroku
- Python 3.8.1
- Pipenv
-
Clone this repository and
cd
into it→ git clone https://github.com/ari-hacks/fastapi-skeleton.git → cd fastapi-skeleton
-
Pipenv dependency management
#run pipenv → pipenv shell
#install dependencies → pipenv install #run locally → uvicorn app.main:app --reload
-
Build Docker Image
➜ docker build -t app .
-
Start Docker container
➜ docker run -d --name fastapi-skeleton-container -p 5000:5000 app
-
Run the application
Uvicorn running on http://0.0.0.0:5000/users/health-check #or http://localhost:5000/users/health-check
-
Check the logs
➜ docker container logs -f fastapi-skeleton-container
Please Sign up before Deploying.