A parser from Puppet to an object model
Project description
puppetparser
puppetparser is a Python library to parse Puppet scripts. This parser allows the transformation of a Puppet script into an object model that represents the constructs of the Puppet DSL language.
Installation
To install run:
pip install puppetparser
Or clone the GitHub repository and run:
poetry install
Usage
from puppetparser.parser import parse
with open(path) as f:
parsed_script, comments = parse_puppet(f.read())
Tests
To run the tests:
python3 -m unittest discover tests
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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
puppetparser-0.2.14.tar.gz
(23.6 kB
view hashes)
Built Distribution
Close
Hashes for puppetparser-0.2.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7c09042337bbb7e94e37d19cfd88e9a5062a823bc05629141f33267a0f75734 |
|
MD5 | 984c6e7e8ed73da329c6dc611cec34fc |
|
BLAKE2b-256 | 6f9cf0704dc7b5144d7c95ff804c840b361025f0e39328485ff2e4a91f7afeed |