python3-cyberfusion-systemd-support
Library for systemd.
Install
PyPI
Run the following command to install the package from PyPI:
pip3 install python3-cyberfusion-systemd-support
Next, ensure you are working on a system that ships systemd.
Debian
Run the following commands to build a Debian package:
mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc
Configure
No configuration is supported.
Usage
Units
from cyberfusion.SystemdSupport.units import Unit
unit = Unit(f"example.{Unit.SUFFIX_SERVICE}")
unit.disable()
unit.stop()
unit.enable()
unit.restart()
unit.reload()
print(unit.is_active)
print(unit.is_enabled)
print(unit.is_failed)
Transient units
from cyberfusion.SystemdSupport.units import TransientUnit
transient_unit = TransientUnit.run(name="cf-apt-upgrade", command=["apt-get", "upgrade", "-y"])
transient_unit.clean_up()
Tmp files
from cyberfusion.SystemdSupport.tmp_files import TmpFileConfigurationLine, TmpFileConfigurationFile
tmp_file_configuration_line = str(TmpFileConfigurationLine(type_="d", path="/tmp/example", mode="0755", user="example", group="example"))
tmp_file_configuration_file = TmpFileConfigurationFile(path="/etc/tmpfiles.d/example.conf")
tmp_file_configuration_file.create()
Metadata
Release files for python3-cyberfusion-systemd-support 2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python3_cyberfusion_systemd_support-2.6.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python3_cyberfusion_systemd_support-2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / python3_cyberfusion_systemd_support-2.6.tar.gz
| Download URL | python3_cyberfusion_systemd_support-2.6.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2650392fcf64cbf2d3cebd05aed468466d0e9641eb634b8caf2b41a0e51323b0
|
|
BLAKE2b-256 checksum How to use checksums |
960167219a967c8de79d8778a4ad1dc5f30efd826a446affcece404cb4ab3cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / python3_cyberfusion_systemd_support-2.6-py3-none-any.whl
| Download URL | python3_cyberfusion_systemd_support-2.6-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4aedc8758a0a140d414a4181edcd63e55185bedbe3211a6f4d7fe3bafa78baf9
|
|
BLAKE2b-256 checksum How to use checksums |
d6e1fbc3ee6ac083afb90fdea2b0b129991fac9ae4e63caedf33ce340e74b4f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|