PoC FastAPI
Required Features
- Some endpoints (create, read, update, delete)
- Authentication with JWT
- Authorization based on users role and permission
- Error handling of the errors in one place
- CORS
- Handling standard readiness and liveness request (they don't require auth)
- Example of Swagger using FastAPI approach that covers different use cases and has enough comments
- Integration with NewRelic
- Wrap some features named above to a middleware (if it doesn't)
- Description of benefits of the async feature of the FastAPI
- Configuration of the app should be handled using pyhocon package
Added on my own taste:
- Linters formatting/validations (black, isort, flake8, mypy)
- Pre-commit validations
- Docker w/ docker-compose
- Entrypoint script
- Migrations with Alembic
- 100% code coverage
- Makefile
- Pagination
Installation instructions
Requirements
- Docker
- docker-compose
Init project
make init
Start API
make run