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.9.tar.gz
(23.4 kB
view hashes)
Built Distribution
Close
Hashes for puppetparser-0.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e18e5dcdc516d9ebbd7b329dcd1358ef2bc05675e673e1e8fa38f987aad90ca |
|
MD5 | e06bf6bbef2da17c9762fece785cb93c |
|
BLAKE2b-256 | aef82270a9f08517eb4bcefa94cbd9034253387bc4ded6ff9b3002bb2519041c |