What is __init__.py file in Python Packages? Explained with Example

preview_player
Показать описание

~ Code Band

Other videos in Code Band :

:) You Can Find Me On:
Рекомендации по теме
Комментарии
Автор

Join Code Band Official Community Groups
... :)

WhatsApp Group Links:

Telegram Group Links:

CodeBand
Автор

take a shot every time, he says 'you know'.

oliverludwig
Автор

stop saying "you know".
I don't know anything...

mahmoodheidari
Автор

That's what I needed, thank you for making it understandable!

altunbikubra
Автор

People are judging you too harshly. It was a really good informative video and I learnt a lot from it.

al-baraael-hag
Автор

This is a good video, I was really confused about why I needed this blank __init__.py file everywhere as it made everything messy. But now I know why it's there and it's use cases.

binaryjava
Автор

This is the best explanation I found for __init__.py

CaptainBravo
Автор

well explained than most of the videos on youtube keep posting

xoxo-ypfc
Автор

Awesome content!! Don't let other comments get into your brain!

balajichippada
Автор

Just amazing, I was looking for this, I had to import every file in the folder, but now I can just import the folder and the __init__.py will import them all for me.

abdulazizalmniey
Автор

Its actually a 4 min-content if you eliminate you know.

shrikanthsingh
Автор

Thanks for the explanations. I hope you don't mind some constructive criticism - you say "you know" A LOT. Dozens of times. It makes it very hard to follow along. One way to avoid it, is writing down what your going to say. There are other methods as well. But you should really kick this habit. Subscribed :)

yarontaub
Автор

You are Indian but your accent is great. By the way thanks !

__________________________
Автор

I got a question for my understanding, from your first use case, you wrote from functions import add.
That is redundant right? Since in the __init__.py, we have from.arithmetic import * (all) ?

daniellive
Автор

avoiding you know can reduce the length of the video by 1 minute.

yughendermeda
Автор

can we have global var in __init__.py or somewhere else in this method???

mahdigholami
Автор

Hi, I need to know how to use init and import a file from one folder to another folder where both the folders are in the main folder.

clueless_nidget
Автор

How you add the external libraries package in your project Could you please provide detail on this.

kunalsharma
Автор

thanks .. main thing is knowing this __init__ not required after 3.3 version.

vishwasgupta