~/talk

Understanding the Magic of Python Modules and Packages

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python]
slides:none on file

Builds modules and packages from scratch and demonstrates a working bookstore app split into modules for books authors users plus routes services and tests, shows how imports resolve via sys.path and PYTHONPATH, explains temporary vs permanent env changes (zshrc example), highlights need for an __init__.py to mark packages, measures benefits by independent testability and reduced blast radius when one module fails, and shows imports and selective from-import usage with concrete file examples.

AI-written summary · about

  1. 0:00Introduction to speaker
  2. 1:31Problems with large code files
  3. 3:16Solving issues with modules
  4. 5:46Understanding packages
  5. 7:12Bookstore app example
  6. 9:39Importing modules in Python
  7. 11:45Module search path
  8. 13:53Setting Python path
  9. 15:39Modules vs libraries vs frameworks
  10. 17:24Benefits of modular code
  11. 19:13Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.