A new backend project created with this boilerplate provides:
- Asynchronous high-performance RESTful APIs built upon FastAPI framework.
- Asynchronous CRUD operations for a sample resource built upon Motor driver for MongoDB, providing high performance and efficiency.
- API documentation with Swagger UI.
- API testing with pytest and pytest-asyncio.
- Dockerfile for containerization and docker-compose support.
- Easy creation of new backend services with cookiecutter.
- Easy package menagement with Poetry.
- Health API for service health checking.
- Easy configuration with environment variables.
- Easy testing, develop running, docker build, docker-compose up and down with Makefile.
- Proper logging with ID masking.
- Python 3.11+
- Poetry installed
- Docker installed
- GNU Make
Edit the .env
file within the project folder.
make test
(This may not work at this time. Please use docker-compose instead.)
make docker-build
make docker-compose-up
make docker-compose-down
make dev
This will create a MongoDB container as well. (This may not work at this time. Please use docker-compose instead.)
Go to http://localhost:8888/docs
.
Pull requests are welcome. For major changes, please open an issue first to discuss what you.
Forked from https://github.com/klee1611/cookiecutter-fastapi-mongo