Python Packages: How To Create And Use With Examples • Python ...
python.land › project-structure › python-packagesFeb 04, 2022 · So a Python package is a folder that contains Python modules and an __init__.py file. The structure of a simple Python package with two modules is as follows:. └── package_name ├── __init__.py ├── module1.py └── module2.py. As mentioned, packages can contain sub-packages. We can use sub-packages to further organize our code. I’ll show you how to do that in one of the sections below. Let’s first take a look at the structure of a package with sub-packages: