← All drills

Build a Metrics API with NumPy and FastAPI

What you'll be able to do

Build a small data service that cleans messy readings, finds the ones that look wrong, and answers questions about them over a REST API, and show with tests and measurements that it can be trusted.

⌁ Metrics backends, smart meters, factory dashboards and the service layer that puts a model behind an endpoint all follow this shape: clean the readings, look for trouble, and answer questions over HTTP.
Start this internship
Create an account to unlock the 6 sections, the workbench, and askThili.
Begin

Sections

1. Build a Metrics API with NumPy and FastAPI
🔒 locked
2. Lesson 1 - Arrays, Not Lists
🔒 locked
3. Lesson 2 - Axes, Broadcasting and Dirty Data
🔒 locked
4. Lesson 3 - Finding the Anomalies
🔒 locked
5. Lesson 4 - Serving It: Your First REST API
🔒 locked
6. Lesson 5 - Making It Trustworthy
🔒 locked

Dig deeper

🔗NumPy: the absolute basics for beginners
docs
🔗NumPy: broadcasting
docs
🔗NumPy: copies and views
docs
🔗NumPy: sliding_window_view
docs
📄Array programming with NumPy (Harris et al., Nature, 2020)
paper
🔗pandas: windowing operations (rolling)
docs
🔗FastAPI tutorial
docs
🔗Pydantic documentation
docs
🔗RFC 9110: HTTP semantics (methods and status codes)
docs
🔗pytest documentation
docs