Skip to main content

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()

Release files for python3-cyberfusion-systemd-support 2.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python3-cyberfusion-systemd-support 2.5.1
File Size Uploaded
python3_cyberfusion_systemd_support-2.5.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python3-cyberfusion-systemd-support 2.5.1
File Interpreter ABI Platform
python3_cyberfusion_systemd_support-2.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / python3_cyberfusion_systemd_support-2.5.1.tar.gz

Download URL python3_cyberfusion_systemd_support-2.5.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
41226fb4172b451bb487510d6f367e67e9c74b25c084a3d9e298bedce7be49ac
BLAKE2b-256 checksum
How to use checksums
c3e2fc0aaef7cd00df40d93656de5cae7ed564935d6eb6ea82f8f1ad9dabfa71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / python3_cyberfusion_systemd_support-2.5.1-py3-none-any.whl

Download URL python3_cyberfusion_systemd_support-2.5.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77ec90ebf041dd82b71974a5f1f3600afa9e37bdee9412c3df73d6818ed3edc2
BLAKE2b-256 checksum
How to use checksums
304eba178049b47849130151bd94e5663e6d23af266f19504a0d3e50293f547c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

2.5.1 This release

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page