3 ms·
If you want to write a Python module, you need to be able to implement whatever you're imagining as plain python. A 2000 line python file is perfectly fine to
by JoeyBananas 3y ago
If you want to write a Python module, you need to be able to implement whatever you're imagining as plain python. A 2000 line python file is perfectly fine to start with.
If you can do that, making it into a proper module that you can pip install is just a matter of adding a pyproject.toml, adding an __init__.py, moving your functions into a new file and a few thing like that.
Generally you should not have any shared variables that are internal to the module (if that's what you're imagining.) If you don't know how to use advanced python constructs ypu don't need them.