Skip to main content

Python bindings for Hashicorp HCL2 Go library

Project description

pygohcl python package

pygohcl

Python wrapper for hashicorp/hcl (v2).

Requirements

The following versions are supported - 3.6, 3.7, 3.8, 3.9.

Setup

pip install pygohcl

Usage

>>> import pygohcl
>>> pygohcl.loads("""variable "docker_ports" {
...   type = list(object({
...     internal = number
...     external = number
...     protocol = string
...   }))
...   default = [
...     {
...       internal = 8300
...       external = 8300
...       protocol = "tcp"
...     }
...   ]
... }""")
{'variable': {'docker_ports': {'default': [{'external': 8300, 'internal': 8300, 'protocol': 'tcp'}], 'type': 'list(object({internal=numberexternal=numberprotocol=string}))'}}}

Building locally

You can use the following commands to build a wheel for your platform:

pip install wheel
python setup.py bdist_wheel

The wheel will be available in ./dist/.

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 pygohcl, version 2.9.1
Filename, size File type Python version Upload date Hashes
Filename, size pygohcl-2.9.1-cp36-cp36m-manylinux1_x86_64.whl (3.1 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp36-cp36m-manylinux2010_x86_64.whl (3.1 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp37-cp37m-manylinux1_x86_64.whl (3.1 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp37-cp37m-manylinux2010_x86_64.whl (3.1 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp38-cp38-manylinux1_x86_64.whl (3.1 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp38-cp38-manylinux2010_x86_64.whl (3.1 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp39-cp39-manylinux1_x86_64.whl (3.1 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size pygohcl-2.9.1-cp39-cp39-manylinux2010_x86_64.whl (3.1 MB) File type Wheel Python version cp39 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