Module Overview
Python Notebooks are a glorified REPL - read-eval-print loop. What if you want code that should live on and be reused in various circumstances? Enter modules, packages, and environments!
In this module, you'll learn how to create reusable Python code through modules and packages, and how to manage dependencies with virtual environments.
Learning Objectives
1. Differentiate between Python Scripts, Modules, Packages, and Libraries
- Understanding the role of Python scripts in automation and execution
- Learning how modules organize and encapsulate code
- Exploring package structure and hierarchy
- Identifying differences between standard library and third-party packages
- Understanding import statements and their behavior
- Managing namespace conflicts and best practices
2. Create a Python package and install dependencies in a dedicated environment
- Setting up virtual environments for project isolation
- Managing project dependencies with pipenv
- Creating a proper package structure
- Writing setup files and configuration
- Installing and managing project requirements
- Understanding environment variables and configuration
Guided Project
In this guided project, we'll start working on our own Python package the right way - by making an environment with pipenv, installing our dependencies, and making some classes.
Guided Project File:
guided-project.md
Module Assignment
Please read the assignment.md file in the GitHub repository for detailed instructions on creating your own Python package and implementing helper utility functions.
Assignment File:
assignment.md