As your programs grow, keeping everything in one file stops making sense. This module covers how Python code is organized across files and projects — and how to bring in code that other people have already written.
It starts with modules: importing your own files,
exploring the standard library, and how Python finds the modules
you import. From there it covers packages —
grouping related modules into a directory with an
__init__.py file. It continues with pip,
Python's package manager, for installing third-party code from
PyPI, and closes with virtual environments, which
keep each project's dependencies isolated from the rest of your
system.
Watch the lessons in order, then continue on to Object-Oriented Programming.
Importing modules you've written yourself as well as modules from the standard library, and how Python's sys.path decides where to look.
Turning a folder of related modules into a proper package using an __init__.py file, and importing from it cleanly.
Installing, uninstalling, listing, and upgrading third-party packages from PyPI using pip.
Keeping each project's package versions separate with virtual environments, so dependencies for one project don't break another.