There are 2 main reasons for __init__.py
For convenience: the other users will not need to know your functions' exact location in your package hierarchy (documentation).
your_package/ __init__.py file1.py file2.py ... fileN.py
# in __init__.py from .file1 import * from .file2 import * ... from .fileN import *
# in file1.py def add(): pass
then others can call add() by
from your_package import add
without knowing file1file1's inside functions, like
from your_package.file1 import add
If you want something to be initialized; for example, logging (which should be put in the top level):
import logging.config logging.config.dictConfig(Your_logging_config)