What is the use of __init__.py file in Python Packages. This question seems simple but has a few concepts like Regular and namespace packages that you might not be aware of.
Python Interview series:
• Python Interview Questions Series - Beginn...
In this video, I will discuss the use of __init__.py file in regular packages and in a future video we will dive deeper into namespace packages as well.
Topics covered:
1. What is the use of __init__.py file
2. Regular and namespace package brief overview
3. Using _all_ variable to control which files are to be included when importing all files from a package
4. A small demo of how __init__.py file is used in projects to do package initialization.
Timestamps:
0:00 - Introduction
0:47 - What is the use of __init__.py file
5:03 - Code examples
Connect with me on LinkedIn:
/ sukanta-roy-448a5856