'Starting a systemd service via python

Is there a way to start/restart a systemd service via python?

I know that I can make a system call - but then I also could write this in shell script...

from subprocess import call
call(["systemctl", "restart service"])

I heared systemd has some python binds, but as far as I saw it they only cover the journal



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source