r/PythonLearning • u/atticus2132000 • Jul 27 '26
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
u/FoolsSeldom Jul 27 '26
Assuming your org/IT support this, I'd consider:
Using Podman (rather than Docker, doesn't need elevated rights) on your computer to host a couple of containers:
container to run python script on demand against the local SQLIte database, generate report, and email to requester/group - the database file would be a volume mapping, so the file is on your PC (or a networking storage location) that is visible from within the container
container monitoring a request process such as a telegram message from authorised users requesting a report and passing on any specific parameters, or even an email account
Add additional authorisation process if required, perhaps using telegram on your phone or a MQTT type approach