Flask app that calls external APIs — useful for demonstrating proxymock record, mock, and replay.
GET /healthz— health checkGET /models— top downloaded models from Hugging FaceGET /models/<org>/<model>— details for a specific model (e.g./models/deepseek-ai/DeepSeek-R1)GET /llm/models— LLM model catalog and pricing from OpenRouterGET /nasa— NASA astronomy picture of the dayGET /events— recent GitHub events for the Speedscale org
graph LR
Client -->|:5001| flask-app
flask-app --> HuggingFace["huggingface.co"]
flask-app --> OpenRouter["openrouter.ai"]
flask-app --> NASA["api.nasa.gov"]
flask-app --> GitHub["api.github.com"]
make install
make local
# Running on http://0.0.0.0:5001
./test-all.shCapture all outbound API calls while using the app:
graph LR
Client -->|:4143| proxymock-in
proxymock-in --> flask-app
flask-app --> proxymock-out[":4140"]
proxymock-out --> HuggingFace
proxymock-out --> OpenRouter
proxymock-out --> NASA
proxymock-out --> GitHub
proxymock-out -.->|saved to disk| files["proxymock/demo/"]
make capture
# hit endpoints in another terminal
./test-all.sh localhost:4143
# ctrl-c to stopRun the app with recorded responses instead of real APIs:
graph LR
Client -->|:5001| flask-app
flask-app -->|:4140| proxymock-mock
proxymock-mock -.->|reads from| files["proxymock/demo/"]
make mock
./test-all.sh # served from recorded data, no real API callsTurn recorded traffic into a load test:
make local &
make replay
# concurrent users
proxymock replay --in proxymock/demo --test-against http://localhost:5001 --vus 10
# CI gate
proxymock replay --in proxymock/demo --test-against http://localhost:5001 \
--fail-if "requests.failed!=0"