Whenever you play with a python package, you will always see some boilerplate files or structures here and there. __init__.py is a file that resides in most of the packages. And even sometimes, they are empty, so what they do?
Here is a summary of its functionalities:
1. It will treat the directory where it is as a loadable module.
Here is a real world example showing you what difference even an empty __init__.py makes.
2. You can define __all__ variable in __init__.py to decide when user type in from package import *, which modules will be loaded.
3. Define a commonly used variable, check out this Stackoverflow answer.