Skip to main content

Build Status

pyvagrantfile

Parses a vagrant file into a python object for inspect. Mainly used to read and build Vagrant file in python. I built this to help me write a utility in python which can build projects and convert Vagrantfiles to packer files.

Supported Directives

  • Most vm.config directives,

  • Chef provisioner

  • Shell provisioner

  • VB provider

Installation

After it’s on the pip server, you should be able to install on the client by running

$ pip install pyvagrantfile

Deployment

When this is ready to be deployed, you can upload it to the pip server

$ cd $WORKSPACE/pyvagrantfile
$ python setup.py sdist upload

Usage

Contributing

virtualenv

When doing development and testing, it’s good practice to use a virtualenv. A virtualenv is a sandboxed python environment which does not modify the system python installation You can install one as follows:

$ pip install virtualenv
$ cd $WORKSPACE/pyvagrantfile
$ virtualenv venv
$ . ./venv/bin/activate
(pyvagrantfile)$

Now that you have a working virtualenv, you can install the utility in development mode. Keep in mind that the ‘activate’ step, is valid only for a single session. If you close the terminal you’ll have to run venv/bin/activate again. You can now run pip, python, and pyvagrantfile while only referring to the local python environment created in $WORKSPACE/pyvagrantfile. You can see this by running:

(pyvagrantfile)$ which pip
$WORKSPACE/pyvagrantfile/venv/bin/python
(pyvagrantfile)$ which python

Development Mode

When testing this utility, you can install it and still edit the source files as follows:

$ cd $WORKSPACE/pyvagrantfile
$ pip install --editable .

Roadmap

I intially tried to use pyPEG, but could not get a handle on it, so for now, we use a custom state parser. I want to move this to a PEG parser to make it easier to manage, but in the spirit of minimum viable product, it’s up and out.

  • This is currently way too specific. Needs to be rewritten to parse general ruby structures and extract details out of it, rather than looking for particular vagrant configurations.

  • Port parser from state parser to PEG parser.

Metadata

Release files for pyvagrantfile 0.5.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvagrantfile 0.5.11
File Size Uploaded
pyvagrantfile-0.5.11.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyvagrantfile 0.5.11
File Interpreter ABI Platform
pyvagrantfile-0.5.11-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 16.1 kB

Release files / pyvagrantfile-0.5.11.tar.gz

Download URL pyvagrantfile-0.5.11.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2c26930b09e25c1a7f064711481ca973a8fbacca20e4e0d79287471f171bb40c
BLAKE2b-256 checksum
How to use checksums
ece9613b7716b694509edb35e28f336a23a071b53152996bc5f4656146d09f4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyvagrantfile-0.5.11-py2.py3-none-any.whl

Download URL pyvagrantfile-0.5.11-py2.py3-none-any.whl
Size 9.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
23760c65f8680111bbbd12adb02b3d657cada3dc7d0b7736fde30f1e32f4881e
BLAKE2b-256 checksum
How to use checksums
69f6879dc449bae2da2f34ca827e474a77062a83b64caba4f52c511c31d08209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.11 This release

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

1 release file

0.5.5

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page