Build an Albums Endpoint
The Music Analytics API you've been building now includes the Chinook database, connected via MCP. Your next feature: an endpoint that returns all albums by a specific artist — useful for artist profile pages or music discovery features.
Create a new db_routes.py Blueprint with this database-backed endpoint and register it with the existing app.py — keeping a clean separation of concerns.
Este exercício faz parte do curso
Software Development with Claude Code
Instruções do exercício
- Start Claude Code with
claude. - Ask Claude to create a new
db_routes.pyBlueprint with an endpoint at/artists/<artist_id>/albumsthat returns all albums by a specific artist as JSON fromchinook.db, and register it withapp.py. - When done, type
/exitto exit Claude Code.
Exercício interativo prático
Transforme a teoria em ação com um de nossos exercícios interativos
Começar o exercício