Metadata-Version: 2.4
Name: systemdunitparser
Version: 0.4
Summary: Parser to read and create unit files for systemd
Author-email: Stephen Gallagher <sgallagh@redhat.com>
License: GPL-3.0-or-later
Project-URL: Homepage, http://github.com/sgallagher/systemdunitparser
Project-URL: Repository, http://github.com/sgallagher/systemdunitparser
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest>=6.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Dynamic: license-file

# SystemdUnitParser

SystemdUnitParser is an extension to Python's `configparser.RawConfigParser` to properly parse
systemd unit files

## Usage

```python
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`
