I am planning to create a Python package. However, I only have one file in my repository to be part of the package. Should I call this file __init__
? Or can I keep the original name since I only have one file?
Asked
Active
Viewed 25 times
0

Emil
- 1,531
- 3
- 22
- 47
-
1https://docs.python.org/3/tutorial/modules.html βThe `__init__.py` files are required to make Python _treat directories containing the file as packages_.β β user2864740 Dec 04 '21 at 22:54
-
2Related: [How can a Python module single file be installed using pip and PyPI?](https://stackoverflow.com/q/33431816/11082165). If you only have one file, you can just leave it as a top-level module. β Brian61354270 Dec 04 '21 at 22:54