Content Deep Dive
Breaking Packages in Python
Blog post from Dagster
Post Details
Company
Date Published
Author
Pedram Navid
Word Count
2,781
Language
English
Hacker News Points
1
Source URL
Summary
The text discusses Python's system of imports, modules, and packages. It highlights the differences between running a script directly vs. running it as a module using the `-m` option. The author explores how Python treats folders as packages, including implicit namespace packages, which were introduced in Python 3.3. The article also touches on relative imports, which can be tricky to use correctly. Finally, it provides guidance on creating and installing a minimal Python package, making it easy to run scripts from anywhere without worrying about the system path.