1 - Creating Python Packages and Modules
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
Define what a module is.
💡 Hint: Think of single Python files you’ve created.
What file must a directory have to be recognized as a package?
💡 Hint: Recall the filename that indicates it's a package.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What defines a Python package?
💡 Hint: Think about how Python recognizes packages.
True or False: A module can contain another module.
💡 Hint: Consider the structure of files in your code.
1 more question available
Challenge Problems
Push your limits with advanced challenges
You are tasked with creating a Python package named 'weather_tools' that will include modules for processing and analyzing weather data. Describe the directory structure and include explanations for each part.
💡 Hint: Think about how to group relevant functionalities in modules and what auxiliary files are necessary.
Suppose you are maintaining a package and want to ensure users only have access to specific functions. How would you set that up in the init.py file?
💡 Hint: Consider how visibility in coding could work; what might you expose to users?
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.