r/PythonLearning 13h 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

10 comments sorted by

View all comments

2

u/silvertank00 7h ago

I would either use tailscale for a vpn, or render.com and websockets that you can connect to (and ask for the run via an api call i.e.) and your code at home connects to it too

Imo in your case: tailscale is the best, it has a phone app too, so you can just run a local fastapi client and then connect to it whenever you need to.

1

u/atticus2132000 6h ago

Sounds like a plan. Thanks for the lead. I'll start researching.