https://github.com/nfsaavedra/puppetparser
puppetparser is a Python library to parse Puppet scripts into an object model
https://github.com/nfsaavedra/puppetparser
parser puppet
Last synced: 3 months ago
JSON representation
puppetparser is a Python library to parse Puppet scripts into an object model
- Host: GitHub
- URL: https://github.com/nfsaavedra/puppetparser
- Owner: Nfsaavedra
- License: gpl-3.0
- Created: 2022-03-28T14:59:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T15:54:33.000Z (11 months ago)
- Last Synced: 2024-10-11T21:45:32.211Z (9 months ago)
- Topics: parser, puppet
- Language: Python
- Homepage:
- Size: 157 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```python
from puppetparser.parser import parsewith 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
[GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/)