Skip to content

23 — APIs

Home · Index

APIs: REST, design, clients, and serving ML/AI models. Web app scaffolding belongs to 22-Web-Development.

Scope

Cheat sheets for designing and consuming APIs, with a focus on serving and calling machine-learning models. FastAPI and Flask cover the server side; requests, curl, and Postman cover the client and testing side.

Cheat Sheets

Sheet Covers
REST API REST principles, resources, methods, status codes, design and versioning
python-requests HTTP from Python: sessions, params, headers, JSON, errors, retries
FastAPI Typed model-serving APIs: routes, pydantic, params, async, OpenAPI
Flask Minimal model-serving APIs: routes, JSON, errors, gunicorn deployment
curl Test ML/AI endpoints from the terminal: JSON bodies, auth, files, timeouts
Postman Visual API testing: collections, environments, variables, newman CI

Contribute