Continue from Part II

Python Foundations Workshop III

Turn a local reporting script into durable work. Claim jobs safely, recover from worker failures, and rehearse a release with evidence you can check.

Python Foundations Workshop III cover with queue cards, a retry arrow, a checkpoint, and a pulse chart
1,000pages
96runnable cases
12chapters
3connected projects

12 chapters

Find a topic

12 chapters

  • 01 State machines and contracts

    Represent job lifecycles with explicit states and invariants. Distinguish a valid state value from an allowed transition.

    Pages 5–77 · 8 cases
  • 02 Clocks, deadlines and scheduling

    Model time at the decision boundary. Work with deadlines, inclusive schedule checks, expired leases and anchored periodic work.

    Pages 78–150 · 8 cases
  • 03 Safe intake and identity

    Validate and normalize input before it becomes durable. Use stable identity, size limits and exact comparisons.

    Pages 151–223 · 8 cases
  • 04 Batch limits and admission

    Put a limit on what enters a worker. Track admission capacity, batch size, workload cost and scheduling order.

    Pages 224–296 · 8 cases
  • 05 Lease ownership and fencing

    Make ownership visible. Attach a generation to each assignment and use conditional writes to refuse stale results.

    Pages 337–409 · 8 cases
  • 06 Retry policy and failure routing

    Retry only eligible failures and keep a budget. Separate permanent rejection, uncertain side effects and transient errors.

    Pages 410–482 · 8 cases
  • 07 Worker concurrency and cancellation

    Choose a concurrency strategy with bounded work and explicit completion order. Keep cancellation and waiting distinct.

    Pages 483–555 · 8 cases
  • 08 Crash recovery and reconciliation

    Recover a job by examining durable facts. Compare receipts and verify candidate snapshots before using them.

    Pages 556–628 · 8 cases
  • 09 Operational events and metrics

    Measure transitions and outcomes with a known population. Keep sensitive data out of diagnostic event fields.

    Pages 669–741 · 8 cases
  • 10 Schema upgrades and compatible releases

    Plan upgrades for existing records and refuse unsupported versions. Treat the shipped artifact as something that needs verification.

    Pages 742–814 · 8 cases
  • 11 Boundaries and operational safety

    Keep operator actions within their allowed scope. Validate names and values before routing a command, opening a file or comparing a credential.

    Pages 815–887 · 8 cases
  • 12 Incident response and release rehearsals

    Rehearse recovery from the same evidence an operator has. Confirm release gates and record what remains uncertain.

    Pages 888–960 · 8 cases

Three connected projects

Operate a durable job queue

01 · Build a queue

Validate work requests, persist them in SQLite, and distinguish exact replays from changed payloads.

02 · Recover a worker

Claim work with a lease, fence off stale results, and recover with a bounded retry policy.

03 · Verify an operational release

Read the audit trail, check a database snapshot, and run a repeatable release rehearsal.

Look inside

See an actual workbook page

Try a state-machine case in the free 16-page excerpt. Preview the source pages from each project.

Open the 16-page sample

Claim a queued task, page 7

Get the complete workbook

The PDF and ZIP include 96 runnable cases with assertions and recorded output, a project suite with tests, and a curriculum index. Use Python 3.12 or newer.

Open the Gumroad listing · $20

USD base price. Applicable tax is calculated at checkout.