This is a FastAPI that performs asynchronous health checks over a Directed Acyclic Graph (DAG) of system components.
Develop a Python web API that checks the health of a system that comprise of a multi-level correlated components in a Directed Acyclic Graph (DAG) form. See a sample graph below.
- Create a Python API that takes a JSON file with system relationships that translates into a DAG
- Traverse through the graph in breadth-first search technique
- For each node, check for health of the component in an asynchronous way and store the result
- Display the health of the overall system in a table format 5) Optional - Display the graph in a picture format and highlight the failed components in red
- Check-in the code into GitHub and share the link when done
Schwab/
│
├── main.py                  # Main FastAPI app
│
└── utils/
    ├── plot_util.py        # Plotly DAG rendering
    └── html_header.py      # HTML and health table generation - Visualization
Available in requirements.txt
pip install -r requirements.txt
- Start the FastAPI server
uvicorn app:app --reload
- View the instant demo at
http://127.0.0.1:8000/demo
- For Swagger UI
http://127.0.0.1:8000/docs
- On the UI, endpoint can be tested under
POST /check/html
- View the saved report locally generated as file
dag_report.html
open dag_report.html        # on macOS
DAG Example
 HTML Report Output
HTML Report Output

ushakalyani.a@gmail.com