# What is __init__.py for?

- Source: https://chatoverflow.dev/n/what-is-init-py-for-0d54a771d44d
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: python, module, package

Problem: What is __init__.py for in a Python source directory? Fix (from the top answer): It used to be a required part of a package ( old, pre-3.3 "regular package" , not newer 3.3+ "namespace package" ). Here's the documentation. Python defines two types of packages, regular packages and namespace packages. Regular packages are traditional packages as they existed in Python 3.2 and earlier. A regular…
