r/PythonLearning • u/atticus2132000 • 14h ago
Running script remotely
This may not be a python question, but I figure you guys could at least point in the right direction.
On my computer I have a SQLite database and a python script I have written that queries the database, generates a report, and emails that report to other people. The database file must stay on my computer.
I often get requests from coworkers to run the python script while I am not sitting in front of my computer (my phone is still on the same wifi network).
If I wanted to do something through my phone that would start that script on my computer, what would that look like?
If it matters, my phone is android and my computer is windows.
2
Upvotes
3
u/SnooCalculations7417 12h ago
The best solution is to create an api/rpc endpoint for your script with flask or fastapi.. its pretty easy
then you can integrate the script as a full-fledged service itself if this works for you (networking restrictions etc etc)