package
Page content
__init__.py
- It tells Python that the directory is a package.
__init__.pyexposes the module functionality to the outside world.- To make code a package, we add an
__init__.pyand put it and the module in a directory with a package name. - It acts as the main interface to the package when someone uses
import <package>. - It contains code to import specific functions from
api.pyso thatcli.pyand our test files can access package functionality liketasks.add()instead of having to dotasks.api.add().