I am a self-taught programmer, and started my job as a PHP developer,in a small company.
I then got some work to write python script. I didn't have any senior with proper Python experience. So I started learning on my own, and started with work. With time, it has happened that, I have written about 90-100 scripts, all single page, each performing some task(most are cron jobs). All the scripts have been doing there task properly, and there has been no issue with the functionality. But I am worried about the structure, the way I have written the code and code quality.
When I searched on internet, I found sites and documents about structures of projects like django and flask, but no where I found, how single page scripts should be handled.
Here are the issues I think I have:
In all my scripts I keep on importing modules(same modules), first 10-15 lines of each script have import statements: should I be using a single file for import statements and include that file everywhere?but that way, I would be importing unnecessary modules as well
I just write scripts in a procedural way, though for functionalities which I require repeatedly like mail-functions, DB connections I have created classes, and use them. Should I write scripts with implementing classes and all?
I am confused about some other points too,but can think of only these two now(will add more). Any more suggestions and help would also be appreciated
Have been confused for long and have been searching a proper answer,but no help.
Thanks in advance :)