Use second virtual machine for calculations only

Hi all,
I have a virtual machine where is locate the main python project code. I would run many parts on other virtual machine using their cpu and ram. I would ask if exists the possibility to delegate works tasks to other machines sending them code and necessary file to manipulate and giving back files manipulated.
Actually I try sending files via scp and the python code is located on the virtual machines. Then when the manipulated files are available I download them with scp again. This is the only possibility or exist a way to use secondary virtual machine in easy way as a sort of bridge?

I hope to have write question clearly
many thanks in advance
best regards

What you’re describing is more generally referred to as “distributed
computing” so you should probably read up on that topic first to get
some idea of the wealth of options for accomplishing your task to
see which fits best. Here’s a Python-specific implementation I found
through a very cursory search:

https://distributed.dask.org/

For something simple, try execnet
https://execnet.readthedocs.io/en/latest/example/test_info.html