package importing (and exporting) module

  • __init__.py

Put import (and thus re-export) in __init__.py


examples/package/2/mymath/calc.py

def add(x, y):
    return x+y


examples/package/2/mymath/__init__.py

import mymath.calc