Affiliate disclosure
Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.
Further Reading: Modules, Packages, and the Python Ecosystem
Python Standard Library
-
Python Standard Library Documentation. (Tier 1) The official reference for every module in the standard library. Bookmark it: https://docs.python.org/3/library/. You don't need to read it cover to cover — use it as a reference when you need a specific module. The companion "Library and Extension FAQ" (https://docs.python.org/3/faq/library.html) answers common beginner questions about finding and using modules.
-
Hellmann, D. Python 3 Module of the Week (PyMOTW-3). (Tier 1) An extensive collection of tutorials for standard library modules, with clear examples and explanations. More approachable than the official docs for learning new modules. Available free online at pymotw.com.
Packaging and Distribution
-
Python Packaging User Guide. (Tier 1) The official guide to installing, creating, and distributing Python packages. Covers
pip, virtual environments,setup.py,pyproject.toml, and everything you need to publish your own package to PyPI. https://packaging.python.org/ -
Ingram, D. (2018). "Inside the Cheeseshop: How Python Packaging Works." PyCon US 2018 talk. (Tier 2) A talk by a PyPI maintainer about why Python packaging is confusing: what each tool you'll encounter (pip, setuptools, wheel, and friends) is for, where it came from (including the odd names), and how they all fit together. Recordings are free online; search for the title.
Software Design and Modularity
-
Martin, R. C. (2008). Clean Code: A Handbook of Agile Software Craftsmanship. Prentice Hall. Chapters 2-3 (Meaningful Names, Functions). (Tier 1) The classic reference on writing maintainable code. The chapters on naming and function design directly reinforce why module organization matters. Written with Java examples, but the principles are language-agnostic.
-
Raymond, E. S. (2003). The Art of Unix Programming. Addison-Wesley. Chapter 4: "Modularity: Keeping It Clean, Keeping It Simple." (Tier 1) A deep discussion of modularity as a design principle, drawing from decades of Unix software design. Covers encapsulation, module size, and the ideas behind why we split code into small, focused units. Available free online at http://www.catb.org/esr/writings/taoup/html/ (Chapter 4 is at http://www.catb.org/esr/writings/taoup/html/modularitychapter.html). Use the
http://address: the site does not serve a valid HTTPS certificate, so anhttps://link may show a browser security warning.
The Python Ecosystem
-
Python Package Index (PyPI). (Tier 1) The central repository for third-party Python packages: https://pypi.org/. More than 900,000 projects are available. Every
pip installpulls from here. -
Ziadé, T. (2008). Expert Python Programming. Packt. Chapter on Packaging. (Tier 2) A more advanced treatment of Python packaging, project structure, and distribution. Good for when you're ready to create your own installable package.
Open Source Software
-
Fogel, K. (2005, updated). Producing Open Source Software. O'Reilly. (Tier 1) A comprehensive guide to how open source projects work — licensing, community management, contribution guidelines, and governance. Available free online at producingoss.com. Relevant context for understanding the ecosystem you're tapping into with
pip install. -
Eghbal, N. (2020). Working in Public: The Making and Maintenance of Open Source Software. Stripe Press. (Tier 1) An insightful look at the economics and social dynamics of open source software. Explores why people maintain packages for free, the "maintainer burnout" problem, and how a few critical packages underpin enormous chunks of the internet.
For the Curious
-
The
importlibmodule documentation. (Tier 2) Python's import system is itself implemented in Python (mostly). Theimportlibmodule exposes the internals of howimportworks. Advanced reading, but fascinating if you want to understand the machinery behindimport. -
Python Language Reference, "The import system." (Tier 1) The official description of exactly what
importdoes: thesys.modulescache, finders and loaders, regular versus namespace packages, and howsys.pathis searched. Dense but authoritative. https://docs.python.org/3/reference/import.html -
Beazley, D. (2015). "Modules and Packages: Live and Let Die!" PyCon 2015 tutorial. (Tier 2) A three-hour tutorial, pitched at experienced programmers, that starts with the basics of modules and packages and works up to package layout, the module search path, and advanced techniques like import hooks. The PyCon recording is free on YouTube (https://www.youtube.com/watch?v=0oTh1CXRaQ0), and the session description is archived at https://pycon-archive.python.org/2015/schedule/presentation/303/. Excellent for understanding what happens "under the hood" when you write
import something.