{"id":15961292,"url":"https://github.com/niklasrosenstein/python-hcl2-ast","last_synced_at":"2025-10-15T11:39:59.676Z","repository":{"id":83667261,"uuid":"490255716","full_name":"NiklasRosenstein/python-hcl2-ast","owner":"NiklasRosenstein","description":"A HCL2 parser based on python-hcl2 that produces an Abstract Syntax Tree.","archived":false,"fork":false,"pushed_at":"2024-04-03T16:16:26.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-07-31T11:36:57.169Z","etag":null,"topics":["ast","hcl","parser","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiklasRosenstein.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-09T11:34:20.000Z","updated_at":"2023-11-03T08:52:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"5145771e-cc50-428f-8607-3064caf53ba5","html_url":"https://github.com/NiklasRosenstein/python-hcl2-ast","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/NiklasRosenstein/python-hcl2-ast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fpython-hcl2-ast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fpython-hcl2-ast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fpython-hcl2-ast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fpython-hcl2-ast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiklasRosenstein","download_url":"https://codeload.github.com/NiklasRosenstein/python-hcl2-ast/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fpython-hcl2-ast/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269987123,"owners_count":24508176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","hcl","parser","python"],"created_at":"2024-10-07T15:41:33.096Z","updated_at":"2025-10-15T11:39:54.607Z","avatar_url":"https://github.com/NiklasRosenstein.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hcl2-ast\n\nA [HCL2][] parser and evaluator based on [python-hcl2][] that produces an Abstract Syntax Tree.\n\n  [HCL2]: https://github.com/hashicorp/hcl/blob/main/README.md\n  [python-hcl2]: https://pypi.org/project/python-hcl2/\n  [hcl2-eval]: https://pypi.org/project/hcl2-eval/\n\n\u003e __Note__: This project is in an early stage. It does not currently cover all HCL2 syntax features\n\u003e and does not have good test coverage.\n\n## Usage\n\n```py\nfrom hcl2_ast import parse_string\n\nmodule = parse_string(\"\"\"\n  hello {\n    name = \"World\"\n  }\n\"\"\")\n\nprint(module.pformat())\n```\n\nOutputs:\n\n```py\nModule(body=[\n  Block(\n    name='hello',\n    args=[],\n    body=[\n      Attribute(key='name', value=Literal(value='World')),\n    ]\n  ),\n])\n```\n\nAlso check out the [hcl2-eval][] package to evaluate HCL2 configuration ASTs.\n\n## Compatibility\n\nhcl2-ast requires Python 3.6 or higher.\n\n## Known issues\n\n* No understanding of operator precedence in expressions (grouping with parentheses works as expected)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasrosenstein%2Fpython-hcl2-ast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklasrosenstein%2Fpython-hcl2-ast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasrosenstein%2Fpython-hcl2-ast/lists"}