There are several options:
nohup python app.py &
- use
screen
- run
supervisord
(link) on system startup and control all through it (pythonic way :))
nohup means: do not terminate this process even when the stty is cut off.
& at the end means: run this command as a background task.