Creating your own Python package is surprisingly easy. A Python package consists of the following three things:
- A directory
- One or more Python files in that directory
- A file called __init__.py in the directory
Once you've done this, you can import your package in whole or in part, just like you would import standard library packages, provided your script is in the same parent directory as the package directory.