A FastAPI rewrite of the Django Ansible Runner, with identical UI and functionality.
pip install -r requirements.txtuvicorn main:app --reload
# → http://127.0.0.1:8000uvicorn main:app --host 0.0.0.0 --port 8000FastAPI auto-generates docs at:
- Swagger UI: http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc
fastapi_ansible_runner/
├── main.py # FastAPI app, routes, SSE streaming
├── requirements.txt
├── templates/
│ └── index.html # Same UI as Django version
├── playbooks/ # ← Drop .yml playbooks here
│ ├── ping_hosts.yml
│ ├── system_info.yml
│ ├── disk_check.yml
│ └── update_packages.yml
└── static/ # Optional static assets
| Django | FastAPI | |
|---|---|---|
| Entry point | manage.py runserver |
uvicorn main:app |
| CSRF protection | Built-in middleware | Not needed (JSON API) |
| Async streaming | StreamingHttpResponse |
StreamingResponse + asyncio |
| Auto API docs | ✗ | ✓ /docs and /redoc |
| Config files | settings.py + app structure |
Single main.py |
| Template engine | Django templates | Jinja2 |