Binary package “python3-pystemd” in ubuntu focal

systemd binding for Python

 This library allows you to talk to systemd over D-Bus from Python, without
 actually thinking that you are talking to systemd over D-Bus. This allows you
 to programmatically start/stop/restart/kill and verify services status from
 systemd point of view, avoiding executing `subprocess.Popen(['systemctl', ...`
 and then parsing the output to know the result.