I’m writing a fairly simple Flask app that requires a cron job. Right now, I have a separate module that imports the classes it needs from my app module. This seems to work just fine.
I stumbled across Flask-Script, and I’m left wondering why it would be used over the solution I have now. Keeping in mind that I am new to Flask, can anyone explain this?
It seems to be a helper module. It just gives you a nice “router” for command line commands instead of URLs.
It’s more convenient and (more importantly) easier to read the intent of the code.
– Especially for non-trivial cases (>200loc)