Tutorial: Build TaskFlow¶
Getting Started has you running in five minutes. Real fluency comes from building something. In this tutorial you build TaskFlow, a small multi-project task tracker, from an empty scaffold to a tested, authenticated API. Each part introduces one concept at a time, in the spirit of Django's official tutorial and Laravel Bootcamp.
By the end you will have written two models with a relationship between them, a full set of CRUD routes, an authorization rule that only lets a task's owner delete it, and a test suite that exercises all of it. Just as importantly, you will understand why each piece works the way it does.
What you'll build¶
- Projects, each with a name and an owner.
- Tasks, which belong to a project and have a title and a done flag.
- Anyone can list and view projects and tasks. Only a logged-in user can create a task, and only the task's creator can delete it.
- A test suite covering the CRUD routes and the authorization rule.
Prerequisites¶
- Python 3.11 or newer
- About fifteen minutes per part
No prior Zeython knowledge is assumed. Every concept is explained as it comes up, though a quick read of Getting Started gives useful context.
The six parts¶
| Part | You will learn |
|---|---|
| 1. Setup | Scaffold the project, explore its structure, run it, and sign in with the built-in User model. |
| 2. Models | Define Project and Task, add validation, and run your first migration. |
| 3. Controllers & Routes | Build a full CRUD API for tasks, testing it with real HTTP requests as you go. |
| 4. Relationships | Connect Task to Project, load them together safely, and avoid the most common async ORM mistake. |
| 5. Authentication & Authorization | Require login to create a task, and let only its owner delete it. |
| 6. Testing | Write a real pytest suite for everything you built, including the authorization rule. |
Every part ends with a working application. Run zeython serve and try what
you just built before moving on.
Found something that doesn't match?
Every command in this tutorial is meant to be copy-pasteable and correct against the current release. If something behaves differently, please open an issue. For anything security-related, follow SECURITY.md instead.
Ready? Start with Part 1: Setup.