FastAPI example
October 22, 2021 ยท View on GitHub
This example demonstrates the integration with the FastAPI web-framework.
Running the example
- Start an instance of SBA (Spring Boot Admin):
docker run --rm -p 8080:8080 --add-host=host.docker.internal:host-gateway michayaak/spring-boot-admin:2.2.3-1 - Once Spring Boot Admin is running, you can run the examples as follow:
cd examples/FastAPI poetry install poetry run python -m fastapi_example_app

Running an example where pyctuator requires authentication
In order to protect the Pyctuator endpoint, a customizer is used to make the required configuration changes to the API router. In addition, the credentials need to be included in the registration request sent to SBA in order for it it could authenticate when querying the pyctuator API.