Skip to main content

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

GPL-3.0

Project details


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 details)

Uploaded Source

Built Distribution

puppetparser-0.2.14-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file puppetparser-0.2.14.tar.gz.

File metadata

  • Download URL: puppetparser-0.2.14.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.9.3-76060903-generic

File hashes

Hashes for puppetparser-0.2.14.tar.gz
Algorithm Hash digest
SHA256 762f11d72b0b5face39a5e9b961f52e892c0e05a85a0b2cf2c5a437b91c759dc
MD5 214a32b0c6de0a891a864d7c2aaa5b68
BLAKE2b-256 db59a96f64d6af76bbd5e37048fa4b34b35cd79ec87940a50b01cea01398bf9e

See more details on using hashes here.

File details

Details for the file puppetparser-0.2.14-py3-none-any.whl.

File metadata

  • Download URL: puppetparser-0.2.14-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.9.3-76060903-generic

File hashes

Hashes for puppetparser-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 b7c09042337bbb7e94e37d19cfd88e9a5062a823bc05629141f33267a0f75734
MD5 984c6e7e8ed73da329c6dc611cec34fc
BLAKE2b-256 6f9cf0704dc7b5144d7c95ff804c840b361025f0e39328485ff2e4a91f7afeed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page