Part III. Making a Website

Part II was a quick tour of FastAPI, to get you up to speed quickly. This part will go wider and deeper into the details. We’ll build a medium-sized web service to access and manage data about cryptids—imaginary creatures—and the equally fictitious explorers who seek them.

The full service will have three layers, as I’ve discussed earlier:

Web

The web interface

Service

The business logic

Data

The precious DNA of the whole thing

Plus the web service will have these cross-layer components:

Model

Pydantic data definitions

Tests

Unit, integration, and end-to-end tests

The site design will address the following:

  • What belongs inside each layer?

  • What is passed between layers?

  • Can we change/add/delete code later without breaking anything?

  • If something breaks, how do I find and fix it?

  • What about security?

  • Can the site scale and perform well?

  • Can we keep all this as clear and simple as possible?

  • Why do I ask so many questions? Why, oh why?

Get FastAPI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.