0

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?

Emil
  • 1,531
  • 3
  • 22
  • 47
  • 1
    https://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
  • 2
    Related: [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

0 Answers0