Python Modules and Packages: An Introduction
In this course, you’ll learn about Pythonmodules and Pythonpackages, two mechanisms that facilitatemodular programming.
Modular programming is the process of breaking a large, unwieldy programming task into separate, smaller, more manageable subtasks ormodules. Individual modules can then be put together like building blocks to create a larger application.
Learn how to write and import modules so you can optimize the structure of your own programs and make them easier to maintain and grow.
What’s Included:
- 16 Lessons
- Video Subtitles and Full Transcripts
- 2 Downloadable Resources
- Accompanying Text-Based Tutorial
- Interactive Quiz to Check Your Progress
- 3 Hands-On Coding Exercises
- Q&A With Python Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths:
Python Modules and Packages: An Introduction
16 Lessons 1h 34m
- 1. Python Modules and Packages: An Introduction (Overview)03:12
- 2. Writing a Module03:18
- 3. The Module Search Path07:00
- 4. The import Statement07:15
- 5. Exercise: Import and Use Module Attributes08:00
- 6. The dir() Function04:42
- 7. Executing a Module06:27
- 8. Exercise: Add a Name Guard08:00
- 9. Reloading a Module03:35
- 10. Python Packages05:41
- 11. Package Initialization05:45
- 12. Importing "*" From a Package07:14
- 13. Exercise: Control Exports With __all__09:30
- 14. Subpackages06:04
- 15. Python Modules and Packages: An Introduction (Quiz)06:30
- 16. Python Modules and Packages: An Introduction (Summary)02:15
AboutChristopher Bailey
Christopher Bailey is the creator and host of the Real Python podcast. He also manages the video course pipeline, coordinating with the video course creators and our in house editor. He is a programmer and data analyst.
» More about ChristopherParticipant Comments
Tyrone
Thanks for this great course Chris! I learnt heaps and you made working with made working with modules and packages much clearer and now it seems so easy. Love your easy paced style, clear language and the way you lift the mist in such a matter of fact way. Well done!!.
Dennis Smith
I have referred back to the article version of this course countless times but these videos worked well to give me a deeper understanding and solidify the knowledge. Well done Chris!
jeffcabral7
Really enjoyed this course Chris! This is a great example on how a basic/introductory course should be presented. Thanks!
pshapard
Great course Chris. I had a general understanding of packages and modules, but I gained a deeper insight into sub-packages and dot notation.
On to the next course.
Thanks,Patrick.
Sergey Morozik
Great course. Brought to order and systematized all I have learned just googling things quickly. Thank you!
Phil M
Hi Chris,
This was a great course. It really exposed me to more of the nuts & bolts of Python. This is something I am struggling to understand, working on my Django project. I really appreciate your sharp quick and concise approach to the subject of OOP in Python Modules and Packages-even though I found it necessary to started and stopped the video many…times to practice and make sure I was on the same page - it really worked!
bphthon, very nice! This was my first time using it and I really like it. I had an issue installing it to macOS Mojave (10.14.6) but found asolution here, just incase anyone else has this issue.
Thank you - Well done!
gagejesse
I dunno how you managed to provide a thorough tutorial on exactly what I needed, two days before I needed it, but I certainly appreciate it. Thank you!
Priya katta
Thanks Chris! Python modules and packages concepts are much clearer now.
Felix Vadan
Thanks for this great course Chris! Made working with modules and packages much clearer. Now I need to watch it again.










