portray or describe (something) precisely.
Demonstrate a potential combination of technologies to rapidly build and deploy Python APIs
Explore the docs »
Report Bug
·
Request Feature
The purpose of this repo is to demonstrate a potential combination of technologies to rapidly build and deploy APIs.
- FastAPI is an API framework which is high performance, easy to learn, fast to code, ready for production
- Behave is a BDD Python framework for collaboration between developers, QA and non-technical or business team members
- Build Packs is a cncf project to transform application code into images to run on any cloud
- Hashicorp Waypoint provides a modern workflow to build, deploy, and release across platforms.
# runs the server
uvicorn main:app --reload --app-dir src
# runs the tests
behave tests
# health check
http :8000/healthz
# companies
http :8000/company/03638404 # Capco
http :8000/company/00048839 # Barclays
# builds the image based on heroku buildpacks
pack build companies-api --path ./src --builder heroku/buildpacks:18
# runs the container on the standard port
docker run -d -p 8000:8000 --name companies-api companies-api
# cleans up
docker rm companies-api -f && docker system prune -f
# run the commands in ./src
cd ./.src
# start the waypoint server locally
waypoint install --platform=docker -accept-tos
# generate the waypoint token
waypoint user token new
# initialises the directory
waypoint init
# deploys the app
waypoint up
# destroys the app
waypoint destroy
docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Ports}}'
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 Capco Digital OSS projects please read:
Distributed under the MIT License. See LICENSE
for more information.