PEP8 is the most commonly used and well-accepted guide to good practice within python, in it you find several 'conventions' for writing your code.
Splitting your module into smaller modules may also vary according to the purpose you are programming for. If it is a desktop application it may be more advantageous to have more robust blocks, otherwise, web applications tend to have the code better divided.
I quote here a passage from the book Thoo scoops of Django , which brings together conventions and tips useful for organizing your project:
When in doubt, keep the apps small.
While the book is geared towards web development, I personally always try to keep that perspective in mind, but it is worth taking into account the semantic factor of the code, as Anderson said previously.
It makes sense that all that your block of code is together in one place, and you think that breaking it into smaller fragments would only make it difficult to read it, there is no reason why it. Home
PEP8 is there to assist you, but your doubt, as you can see, seems to be somewhat subjective. I leave some reading recommendations that I hope will help you. If you are a solo programmer try to read the PEP and find the one that suits you best, if you program with a team, try to talk to the other programmers and find a form that is intelligible to everyone.
Complement Read