Python · Modules, Packaging and Dependencies · Intermediate · 28 min read
Python Modules, Packages and Imports: How Import Really Works and How to Structure Projects
Understand modules, packages and the import system in depth. See how Python finds and caches modules, how absolute and relative imports work, what __init__.py does, how to avoid circular imports, how to lay out a project with src layout, and how to run code as a module.
Create an account to start
Create a free account to see what this lesson covers
- Every free lesson in every section, in full
- Track your progress and pick up where you left off
- Free practice questions and an incident simulation
- Takes under a minute: name, email and a password
No card needed. Full access to Python is a paid upgrade you can choose later.