Python

From your first script to idiomatic, tested and concurrent Python.

7 stages40 topics

Legend

  • RequiredRequiredThe core path, follow it in order
  • Must knowMust knowYou should know it
  • RecommendedRecommendedOur pick: useful and worth your time
  • Worth a lookWorth a lookNot a priority: learn it when you can
  • OptionalOptionalAn alternative: you can skip it
  1. Fundamentals

  2. Data structures

    • RequiredLists and tuplesSoon
    • RequiredDictionaries and setsSoon
    • RequiredComprehensionsSoon
    • RequiredUnpackingSoon
    • Must knowThe collections moduleSoon
    • Must knowMinimum version3.7DataclassesSoon
    • Must knowMinimum version3.10Pattern matchingSoon
  3. Organizing code

    • RequiredModules and packagesSoon
    • RequiredVirtual environmentsSoon
    • RequiredDependencies and pyproject.tomlSoon
    • RequiredExceptionsSoon
    • OptionalMinimum version3.11Exception groups (except*)Soon
    • RequiredFiles and pathlibSoon
    • RequiredContext managersSoon
  4. Idiomatic Python

    • RequiredClasses and objectsSoon
    • RequiredThe data model (dunder methods)Soon
    • RequiredIterators and generatorsSoon
    • RequiredDecoratorsSoon
    • Must knowMinimum version3.5Type hintsSoon
    • OptionalMinimum version3.12Generic syntax (class Box[T])Soon
  5. Tooling and quality

    • RequiredTesting with pytestSoon
    • Must knowLinting and formattingSoon
    • Must knowType checkingSoon
    • RequiredLoggingSoon
    • OptionalDebuggingSoon
  6. Concurrency

    • RequiredThe GILSoon
    • RequiredThreads and processesSoon
    • Must knowMinimum version3.7asyncioSoon
    • OptionalMinimum version3.11Task groupsSoon
    • OptionalMinimum version3.14tFree-threaded PythonSoon
  7. Specialize

    • Required
      • FastAPIRecommended
      • DjangoRecommended
      • FlaskOptional

      Build for the web

      Pick one path

      • FastAPIRecommendedSoon
      • DjangoRecommendedSoon
      • FlaskOptionalSoon
    • Must know
      • SQLAlchemyRecommended
      • SQLModelOptional
      • Tortoise ORMOptional

      Talk to a database (ORMs)

      An ORM maps tables to Python classes, so you query and save objects instead of writing SQL strings. All three options below do that; they differ in how much they do for you and whether they are built for async code.

      • SQLAlchemy is the standard. Its core gives you a SQL toolkit and its ORM a full unit of work, with sync and async sessions. Learn it first: most other tools build on it or copy its ideas.
      • SQLModel sits on top of SQLAlchemy and Pydantic: one class is both your table and your API schema. A good fit with FastAPI when the models are simple.
      • Tortoise ORM is async from the ground up, with a Django-like API. Pick it for an async service when you prefer that style over SQLAlchemy’s.

      Whatever you choose, keep learning SQL itself: an ORM saves typing, not understanding what the database does.

      Pick one path

      • SQLAlchemyRecommendedSoon
      • SQLModelOptionalSoon
      • Tortoise ORMOptionalSoon
    • Must know
      • pandasRecommended
      • PolarsOptional
      • NumPyOptional

      Work with data

      Pick one path

      • pandasRecommendedSoon
      • PolarsOptionalSoon
      • NumPyOptionalSoon