mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-06-26 05:54:37 +08:00
20 lines
483 B
Python
20 lines
483 B
Python
"""Small runnable report for the README demo."""
|
|
|
|
import json
|
|
|
|
from routes import get_users, health_check
|
|
|
|
|
|
def build_summary():
|
|
"""Collect a deterministic status payload."""
|
|
users = get_users()
|
|
return {
|
|
"service": "demo-api",
|
|
"status": health_check()["status"],
|
|
"active_users": users["total"],
|
|
"roles": sorted({user["role"] for user in users["users"]}),
|
|
}
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print(json.dumps(build_summary(), indent=2))
|