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.1
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.1.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python3_cyberfusion_systemd_support-2.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / python3_cyberfusion_systemd_support-2.6.1.tar.gz
| Download URL | python3_cyberfusion_systemd_support-2.6.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e607810f1bf8f0dfd2a9a819dbc2e314532c65a4df0ee6376ef87486cf0ffc23
|
|
BLAKE2b-256 checksum How to use checksums |
4d3c2a2371512cac0642d880ca96afa2638cf17d09c92ee13736b15a6ed577b0
|
| 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.1-py3-none-any.whl
| Download URL | python3_cyberfusion_systemd_support-2.6.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24b88d80b5f0a2c0c0067953a3a5929a5f72a0f95fb3eeece031bce8caef0b20
|
|
BLAKE2b-256 checksum How to use checksums |
3b218b6efa3d3810cf2381b5e564e9bc89658ec4358348d961e691105256c5e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|