chore: initialize containerized Python learning workbook (2026 DevOps/SRE)
This commit is contained in:
commit
ae4c421815
63 files changed
+1273
No files matched your search
@@ -0,0 +1,10 @@
|
||||
# 02 — Web API z `FastAPI` + `Pydantic`
|
||||
|
||||
## Zadania (`api_fastapi.py`)
|
||||
1. `GET /health` -> `{"status": "ok"}`.
|
||||
2. `POST /echo` -> przyjmuje `EchoRequest(message: str)`; odrzuca pusty napis (po `strip()`) kodem `400`, w przeciwnym razie zwraca `EchoResponse(echoed=..., length=...)`.
|
||||
|
||||
## Uruchomienie testów
|
||||
```bash
|
||||
make test MOD=03-ecosystems/02-web-api-fastapi
|
||||
```
|
||||
Reference in new issue
Block a user