Module 6 Overview
Module 6: Modules and Packages deals with code organization on a larger scale. As your programs grow, keeping all logic in a single file becomes unmanageable. Python allows you to split your code into separate files (modules) and directories (packages).
In this module, we will learn how to create our own modules, structure larger applications using packages, and explore the vast ecosystem of Python’s Standard Library.
Learning Objectives
Section titled “Learning Objectives”By the end of this module, you will be able to:
- Import functionality using
import,from ... import, and aliases. - Create and structure your own Custom Modules.
- Organize multiple modules into Packages using
__init__.py. - Avoid Circular Imports and understand how Python finds modules.
- Leverage the power of the Python Standard Library (e.g.,
os,sys,datetime).
Module Contents
Section titled “Module Contents” The Import System How to bring external code into your script.
Creating Modules Writing your own reusable code files.
Packages Organizing modules into directories.
The Standard Library Batteries included: Essential built-in modules.