# 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 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
[GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/)
Raw data
{
"_id": null,
"home_page": null,
"name": "puppetparser",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "puppet, parser, object model",
"author": "Nuno Saavedra",
"author_email": "nuno.saavedra@tecnico.ulisboa.pt",
"download_url": "https://files.pythonhosted.org/packages/db/59/a96f64d6af76bbd5e37048fa4b34b35cd79ec87940a50b01cea01398bf9e/puppetparser-0.2.14.tar.gz",
"platform": null,
"description": "# puppetparser\n\npuppetparser 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.\n\n## Installation\n\nTo install run:\n```\npip install puppetparser\n```\n\nOr clone the GitHub repository and run:\n```\npoetry install\n```\n\n## Usage\n\n\n```python\nfrom puppetparser.parser import parse\n\nwith open(path) as f:\n parsed_script, comments = parse_puppet(f.read())\n```\n\n## Tests\n\nTo run the tests:\n```\npython3 -m unittest discover tests\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/)\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "A parser from Puppet to an object model",
"version": "0.2.14",
"project_urls": {
"Bug Reports": "https://github.com/Nfsaavedra/puppetparser/issues",
"Source": "https://github.com/Nfsaavedra/puppetparser"
},
"split_keywords": [
"puppet",
" parser",
" object model"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f9cf0704dc7b5144d7c95ff804c840b361025f0e39328485ff2e4a91f7afeed",
"md5": "984c6e7e8ed73da329c6dc611cec34fc",
"sha256": "b7c09042337bbb7e94e37d19cfd88e9a5062a823bc05629141f33267a0f75734"
},
"downloads": -1,
"filename": "puppetparser-0.2.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "984c6e7e8ed73da329c6dc611cec34fc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 24128,
"upload_time": "2024-08-08T15:56:04",
"upload_time_iso_8601": "2024-08-08T15:56:04.380441Z",
"url": "https://files.pythonhosted.org/packages/6f/9c/f0704dc7b5144d7c95ff804c840b361025f0e39328485ff2e4a91f7afeed/puppetparser-0.2.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db59a96f64d6af76bbd5e37048fa4b34b35cd79ec87940a50b01cea01398bf9e",
"md5": "214a32b0c6de0a891a864d7c2aaa5b68",
"sha256": "762f11d72b0b5face39a5e9b961f52e892c0e05a85a0b2cf2c5a437b91c759dc"
},
"downloads": -1,
"filename": "puppetparser-0.2.14.tar.gz",
"has_sig": false,
"md5_digest": "214a32b0c6de0a891a864d7c2aaa5b68",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 23599,
"upload_time": "2024-08-08T15:56:05",
"upload_time_iso_8601": "2024-08-08T15:56:05.916105Z",
"url": "https://files.pythonhosted.org/packages/db/59/a96f64d6af76bbd5e37048fa4b34b35cd79ec87940a50b01cea01398bf9e/puppetparser-0.2.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-08 15:56:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Nfsaavedra",
"github_project": "puppetparser",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "puppetparser"
}