kill is the command to send signals to processes.
You can use kill -9 PID to kill your python process, where 9 is the number for SIGKILL and PID is the python Process ID.
I have running python file "cepusender/main.py" (and another python files), how can i restart/kill only main.py file?
How to restart specific running python file Ubuntu