bc-python-hcl2


Namebc-python-hcl2 JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/bridgecrewio/python-hcl2
SummaryA parser for HCL2
upload_time2023-11-12 16:13:16
maintainer
docs_urlNone
authorbridgecrew
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements lark importlib-resources
Travis-CI No Travis.
coveralls test coverage
            [![Build Status](https://github.com/bridgecrewio/python-hcl2/workflows/build/badge.svg)](https://github.com/bridgecrewio/python-hcl2/actions)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/bc-python-hcl2.svg)](https://pypi.org/project/bc-python-hcl2/)
[![Python Versions](https://img.shields.io/pypi/pyversions/bc-python-hcl2.svg)](https://pypi.python.org/pypi/bc-python-hcl2)
[![Downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&url=https%3A%2F%2Fpypistats.org%2Fapi%2Fpackages%2Fbc-python-hcl2%2Frecent&query=data.last_month&colorB=brightgreen&suffix=%2FMonth)](https://pypistats.org/packages/bc-python-hcl2)

# Notice

This is a fork of the [Python HCL2](https://github.com/amplify-education/python-hcl2) repo by Amplify and is 
officially supported by Bridgecrew. We contributed as much as possible to the upstream project, but the two projects 
are now deviating in a way that pushing new changes upstream doesn't make sense anymore.

## Python HCL2

A parser for [HCL2](https://github.com/hashicorp/hcl/blob/hcl2/hclsyntax/spec.md) written in Python using
[Lark](https://github.com/lark-parser/lark). This parser only supports HCL2 and isn't backwards compatible
with HCL v1. It can be used to parse any HCL2 config file such as Terraform.

## About Amplify

Amplify builds innovative and compelling digital educational products that empower teachers and students across the 
country. We have a long history as the leading innovator in K-12 education - and have been described as the best tech 
company in education and the best education company in tech. While others try to shrink the learning experience into  
the technology, we use technology to expand what is possible in real classrooms with real students and teachers.

Learn more at <https://www.amplify.com>

## Getting Started
### Prerequisites

python-hcl2 requires Python 3.7 or higher to run.

### Installing

This package can be installed using `pip`

```sh
pip install bc-python-hcl2
```

### Usage
```python
import hcl2
with open('foo.tf', 'r') as file:
    dict = hcl2.load(file)
```

## Building From Source

For development, `tox>=2.9.1` is recommended.

### Running Tests

python-hcl2 uses `tox`. You will need to install tox with `pip install tox`.
Running `tox` will automatically execute linters as well as the unit tests.

You can also run them individually with the `-e` argument.

For example, `tox -e py37-unit` will run the unit tests for python 3.7

To see all the available options, run `tox -l`.

## Responsible Disclosure
If you have any security issue to report, contact project maintainers privately.
You can reach us at <mailto:github@amplify.com>

## Contributing
We welcome pull requests! For your pull request to be accepted smoothly, we suggest that you:
 1. For any sizable change, first open a GitHub issue to discuss your idea.
 2. Create a pull request.  Explain why you want to make the change and what it’s for.

We’ll try to answer any PR’s promptly.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bridgecrewio/python-hcl2",
    "name": "bc-python-hcl2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "bridgecrew",
    "author_email": "meet@bridgecrew.io",
    "download_url": "https://files.pythonhosted.org/packages/f2/8e/3119325e775ea84e63e10ada2cb18fa07c820d98b81606f40ff3602feeb1/bc-python-hcl2-0.4.1.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://github.com/bridgecrewio/python-hcl2/workflows/build/badge.svg)](https://github.com/bridgecrewio/python-hcl2/actions)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/bc-python-hcl2.svg)](https://pypi.org/project/bc-python-hcl2/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/bc-python-hcl2.svg)](https://pypi.python.org/pypi/bc-python-hcl2)\n[![Downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&url=https%3A%2F%2Fpypistats.org%2Fapi%2Fpackages%2Fbc-python-hcl2%2Frecent&query=data.last_month&colorB=brightgreen&suffix=%2FMonth)](https://pypistats.org/packages/bc-python-hcl2)\n\n# Notice\n\nThis is a fork of the [Python HCL2](https://github.com/amplify-education/python-hcl2) repo by Amplify and is \nofficially supported by Bridgecrew. We contributed as much as possible to the upstream project, but the two projects \nare now deviating in a way that pushing new changes upstream doesn't make sense anymore.\n\n## Python HCL2\n\nA parser for [HCL2](https://github.com/hashicorp/hcl/blob/hcl2/hclsyntax/spec.md) written in Python using\n[Lark](https://github.com/lark-parser/lark). This parser only supports HCL2 and isn't backwards compatible\nwith HCL v1. It can be used to parse any HCL2 config file such as Terraform.\n\n## About Amplify\n\nAmplify builds innovative and compelling digital educational products that empower teachers and students across the \ncountry. We have a long history as the leading innovator in K-12 education - and have been described as the best tech \ncompany in education and the best education company in tech. While others try to shrink the learning experience into  \nthe technology, we use technology to expand what is possible in real classrooms with real students and teachers.\n\nLearn more at <https://www.amplify.com>\n\n## Getting Started\n### Prerequisites\n\npython-hcl2 requires Python 3.7 or higher to run.\n\n### Installing\n\nThis package can be installed using `pip`\n\n```sh\npip install bc-python-hcl2\n```\n\n### Usage\n```python\nimport hcl2\nwith open('foo.tf', 'r') as file:\n    dict = hcl2.load(file)\n```\n\n## Building From Source\n\nFor development, `tox>=2.9.1` is recommended.\n\n### Running Tests\n\npython-hcl2 uses `tox`. You will need to install tox with `pip install tox`.\nRunning `tox` will automatically execute linters as well as the unit tests.\n\nYou can also run them individually with the `-e` argument.\n\nFor example, `tox -e py37-unit` will run the unit tests for python 3.7\n\nTo see all the available options, run `tox -l`.\n\n## Responsible Disclosure\nIf you have any security issue to report, contact project maintainers privately.\nYou can reach us at <mailto:github@amplify.com>\n\n## Contributing\nWe welcome pull requests! For your pull request to be accepted smoothly, we suggest that you:\n 1. For any sizable change, first open a GitHub issue to discuss your idea.\n 2. Create a pull request.  Explain why you want to make the change and what it\u2019s for.\n\nWe\u2019ll try to answer any PR\u2019s promptly.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A parser for HCL2",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/bridgecrewio/python-hcl2"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0961d9c346dee6db6d2d3d491cafa56d7b6df940ee2465295f5be6e5691fd61a",
                "md5": "ce79db34e63412052547b86d500bbde2",
                "sha256": "55943510b9a4f4a8571405a14570d59c48b542857c5395e11d99852be3d1ad0d"
            },
            "downloads": -1,
            "filename": "bc_python_hcl2-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce79db34e63412052547b86d500bbde2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 14910,
            "upload_time": "2023-11-12T16:13:15",
            "upload_time_iso_8601": "2023-11-12T16:13:15.488216Z",
            "url": "https://files.pythonhosted.org/packages/09/61/d9c346dee6db6d2d3d491cafa56d7b6df940ee2465295f5be6e5691fd61a/bc_python_hcl2-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f28e3119325e775ea84e63e10ada2cb18fa07c820d98b81606f40ff3602feeb1",
                "md5": "479bed52343d6d8def231b3799cc46ec",
                "sha256": "72a438ceeced7d2e4c898e218f55a2a4aba7a887c1d64a4cf913837193c446b6"
            },
            "downloads": -1,
            "filename": "bc-python-hcl2-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "479bed52343d6d8def231b3799cc46ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12286,
            "upload_time": "2023-11-12T16:13:16",
            "upload_time_iso_8601": "2023-11-12T16:13:16.986356Z",
            "url": "https://files.pythonhosted.org/packages/f2/8e/3119325e775ea84e63e10ada2cb18fa07c820d98b81606f40ff3602feeb1/bc-python-hcl2-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-12 16:13:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bridgecrewio",
    "github_project": "python-hcl2",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "lark",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "importlib-resources",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "bc-python-hcl2"
}
        
Elapsed time: 0.18653s