Convert to Package and Module | PyCharm
www.jetbrains.com › help › pycharmMay 18, 2021 · A module is a .py source file with Python definitions that can be imported to other modules. To convert a Python module to a Python package Select a .py file. Select Refactor | Convert to Python Package. Inspect the project: the package named as the converted module is created; the __init__.py file contains all code from the .py file.