Skip to main content
CodeOath
← All tracks

Track · For working professionals

Backend engineering in Python

Build one small ticketing service from a Python class to a Django app with a login that proves the right things and a test suite that would tell you, with every example run.

Chapters

Chapters 2 to 11 need a plan.

  1. 01A ticket as a Python objectModel a support ticket in Python with classes, dataclasses, enums and the special methods that decide how an object prints, compares and sorts.About 12 minFree
  2. 02Functions that carry the serviceWrite the functions a Python service leans on: star arguments, decorators, generators for large exports, and context managers that undo a half-finished change.About 12 minLocked: needs a plan
  3. 03Errors, inheritance and waiting on the networkGive a Python service its own errors, understand inheritance and super(), and pick threads, processes or asyncio for work that computes or waits on a network.About 12 minLocked: needs a plan
  4. 04Tickets in a database: Django models and migrationsMove tickets into a database with Django: models, foreign keys and delete rules, migrations, lazy querysets and the N+1 bug, with the SQL shown.About 12 minLocked: needs a plan
  5. 05Views, URLs and the request cycleFollow one request through Django: URL patterns, middleware, views, forms, templates and CSRF protection, with a query-count test that keeps a fix in place.About 12 minLocked: needs a plan
  6. 06What a token provesLearn what a signed token proves and what it does not: the authorization code flow, JWT claims, signing algorithms, and the checks an API must make.About 12 minLocked: needs a plan
  7. 07Sessions, tokens and the stolen laptopCompare access, refresh and ID tokens with session cookies, and see how storage, rotation and revocation limit the damage when a laptop or token is stolen.About 12 minLocked: needs a plan
  8. 08Tests that would tell youWrite Python tests that fail when the code breaks: pytest, parametrize, fixtures, mocks patched where the name is looked up, and coverage as a warning light.About 12 minLocked: needs a plan
  9. 09Why the code flow holds, and what the other grants are forLearn why the OAuth code flow holds against a watcher on the redirect, and which grant, scope and check each kind of caller needs, in a small working lab.About 12 minLocked: needs a plan
  10. 10Who signed in: OpenID Connect and one login for many servicesLearn what an ID token adds to OAuth: the checks that make it believable, how signing keys rotate, and why accounts key on issuer and subject, not email.About 12 minLocked: needs a plan
  11. 11Apps, the admin and signalsSee how a Django project is made of apps, which admin columns cost a query per row, and which writes skip signals, all measured on a real project.About 12 minLocked: needs a plan