portray or describe (something) precisely.
A repo to demonstrate the building of a more advanced API using more FastAPI features and some other useful packages.
Explore the docs »
Report Bug
·
Request Feature
This repo shows a relatively realistic API implementation for a simple CRUD like API, that stores it's data in MongoDB. It demonstrates a some more isoterical features of FastAPI. In addition some 3rd party packages have been used to provide functionality that would likely be required in a production solution, specifically:
- tenacity is used to provide retry decorators for certain functions/methods
- dependency-injector was used for dependency injection to reduce coupling
Further logos can be inserted to highlight the specific technologies used to create the solution from here.
This repo follows the principle of minimal manual setup of the local development environment. If using VSCode and devcontainers a full local environment is provisioned. If running on a different IDE then taskfile can be used to simplify the local setup by using task init
. This command will intsall pip
dependencies, stand up the docker services and installs pre-commit
. High level the following local software is required:
- Taskfile
- Python >= 3.10
- Docker & Docker Compose
- Httpie
A boilerplate docker-compose
file is provided that can be used to manage local environment services. The stack can be found at ops/local/stack.yaml
. For convience some simple commands have been provided.
# stands up the local services
task local:up
# tears down the local services
task local:down
Once the [MongoDB] instance is running in Docker it is possible to run the API. In VSCode A debugging lunch has been provided for VSCode called customers-api
. When the API is running then it's health can be tested using http :8000/healthz
.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you would like to contribute to any delineate.io OSS projects please read:
Distributed under the MIT License. See LICENSE
for more information.