Python for AIPython 3.10+ · Pydantic 2.12
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
33 small wins to finish your pathNext lesson

What you are going to build

You will finish this course with a Python program that reads a file of customer support tickets, asks a model to sort each one, checks every answer, and saves the results.

It starts from nothing. Lesson 1 is a single line that prints a word, and every lesson after it adds one idea and uses it straight away on the same tickets.

What the finished program does
Read the tickets. Five customer messages in a JSON file, loaded into a list of dictionaries.Step 1 of 5
The eight parts of the course
First linesprint and variablestext and numbersif and elseMany valueslistsfor loopsdictionariesFunctionsdef and returnargumentsimportsFiles and errorsreading filesJSONtry and exceptClassesobjectsmethodsinheritanceChecking datatype hintsPydanticWaiting on modelsasync and awaitmany calls at onceretriesA real projectvirtual environmentspytestthe triage programPython for AI

What a model is, for this course

A model here means a large language model: a program you send text to and get text back from. The frameworks you will meet after this course are mostly ways of sending that text, reading the answer, and deciding what to do with it.

You do not need an account or an API key. In lesson 17 you write a small function that answers the way a model does, and the rest of the course uses it. Everything you learn works the same when a real model takes its place.

What you need

  • A browser, for lessons 1 to 28. Each lesson with a finished program has an editor beside it: change the code and press Run.
  • Python 3.10 or later on your own computer, for lessons 29 to 32, where you install packages and run tests.

No programming experience is assumed. If you already know some Python, the quizzes at the end of each part are a quick way to find the lessons worth reading.

Back toAll frameworks

Every expert started right here.