Skip to main content - python library for interacting with hashicorp packer CLI

Project description

.. image::

.. image::

.. image::

.. image::

===== - python library for interacting with hashicorp `packer`_ CLI executable.

Project follows `semantic versioning`_ , v0.x.x API should be considered unstable, API will change frequently, please plan accordingly.

============ can be installed via pip:

.. code:: sh

$ pip install


Below is the equivalent of running `packer CLI commands`_

.. code:: python

>>> from packerpy import PackerExecutable
>>> PackerExecutable().validate('/path/to/good_template.json')
(0, '1521843453,,ui,say,Template validated successfully.\n', '')
>>> PackerExecutable().validate('/path/to/bad_template.json')
(1, "1521843610,,ui,error,Template validation failed. Errors are shown below.\\n\n1521843610,,ui,error,Errors validating build 'amazon-ebs'. 1 error(s) occurred:\\n\\n* Bad script '': stat no such file or directory\n", '')
>>> PackerExecutable().validate('/path/to/bad_template.json', syntax_only=True)
(0, '1521843659,,ui,say,Syntax-only check passed. Everything looks okay.\n', '')
>>> PackerExecutable(config={'stdout': None }).version()
1521843095,,ui,say,Packer v0.10.2
1521843095,,ui,say,Your version of Packer is out of date! The latest version\nis 1.2.1. You can update by downloading from
(0, None, '')
>>> PackerExecutable(config={'executable_path': '/path/to/packer_1.2.1' , 'stdout': None }).version()
1521848321,,ui,say,Packer v1.2.1
(0, None, '')

Currently supported Packer CLI commands

- build
- inspect
- validate
- version

========= is licensed under the `Apache license 2.0`_.
See `LICENSE`_ for the full license text.

.. _`packer`:
.. _`packer CLI commands`:
.. _`LICENSE`:
.. _`Apache license 2.0`:
.. _`BSD 2-Clause license`:
.. _`semantic versioning`:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page