Parser to read and create unit files for systemd
Project description
SystemdUnitParser
SystemdUnitParser is an extension to Python's configparser.RawConfigParser
to properly parse
systemd unit files
Usage
from SystemdUnitParser import SystemdUnitParser
config = SystemdUnitParser()
config.read('sample.service') # or any other systemd unit file
print(config.sections()) # get all sections of the unit file
print(config.options('Unit')) # get all options in a section
print(config.get('Unit', 'Description')) # get the actual value of an action
Contributing
- create a fork
- create a new branch from origin/master
- do your patches
- run
pytest
- push your changes to your fork and create a PR
License
This module is licensed under GPL-3.0-or-later
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
systemdunitparser-0.3.tar.gz
(16.4 kB
view details)
Built Distribution
File details
Details for the file systemdunitparser-0.3.tar.gz
.
File metadata
- Download URL: systemdunitparser-0.3.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4efdc0ebc33c4aa69517a3dfa3c1f0a1379829af22e2371b5d06f7bc995acda7 |
|
MD5 | bb6e6c858df2e0b86eebae0e43e444fb |
|
BLAKE2b-256 | b13505abf50813a55a32d859809c6b019c505c6aa881f2ccdd0b2a82f6ce369e |
File details
Details for the file systemdunitparser-0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: systemdunitparser-0.3-py2.py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449538caf16c46186a904d20c8386f1e7d757559305d887bda27334736a654d0 |
|
MD5 | 259e3f71485130aeda3be0ccc81ede50 |
|
BLAKE2b-256 | f9a2cef6eb15d06a9a0c73ed72afd00e6a4df4140813add897ccac06d346866f |