$npx skillfedfor your agent

bc-python-hcl2

A parser for HCL2

With conditionsPyPI Python ModulesReleased Jul 20254.6M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — bc_python_hcl2-0.4.3-py3-none-any.whl
v0.4.3 · released 2025-07-14 · Python >=3.8 · 2 runtime deps: lark, importlib-resources

Yes, if you need to parse HCL2 files programmatically. The package has low install friction, permissive licensing, and no known vulnerabilities. However, note that maintenance is aging (last release 396 days ago) and the project has minimal community activity (5 stars). It remains suitable for stable use cases but may not receive rapid updates for new HCL2 features or edge cases.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or higher.
  • Low install friction with only two runtime dependencies (lark and importlib-resources).
  • Maintenance status is aging—last release was 396 days ago and the repo shows minimal activity (5 stars), though it remains actively maintained and not archived.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in both open-source and commercial projects with minimal restrictions.

last release 2025-07-14 (396 days) · last repo commit 2025-07-14 · 5 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,595,690 downloads/mo, #2,278 on PyPI

Verify before relying

pip install bc-python-hcl2

import hcl2
with open('foo.tf', 'r') as file:
    config = hcl2.load(file)
  • Completeness of HCL2 spec coverage beyond basic parsing—which features or edge cases may not be fully supported
  • Performance characteristics when parsing large or deeply nested configuration files
  • Whether the fork divergence from upstream python-hcl2 introduces breaking changes for existing users
Same gist for agents: .md · .json

What it is and what it does

bc-python-hcl2 is a HCL2 parser for Python that converts HashiCorp Configuration Language v2 files into native Python dictionaries. It uses Lark, a parsing toolkit, to handle the HCL2 grammar and is commonly used to programmatically read and process Terraform configuration files. The package is a maintained fork of the original python-hcl2 project, officially supported by Bridgecrew, and supports Python 3.8 through 3.12.

The parser is designed specifically for HCL2 and does not support the older HCL v1 syntax. It provides a simple API—typically just calling `hcl2.load()` on an open file—making it straightforward to integrate into tools that need to inspect or manipulate infrastructure-as-code configurations programmatically.

Use it for

  • Parse Terraform .tf files to extract resource definitions and configuration values for analysis or validation
  • Build tooling that reads HCL2 configs to generate documentation or reports about infrastructure
  • Integrate HCL2 parsing into policy-as-code or security scanning tools that inspect infrastructure definitions
  • Convert HCL2 configurations to other formats (JSON, YAML) for interoperability with non-Terraform tools

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to parse HCL2 files programmatically.

The package has low install friction, permissive licensing, and no known vulnerabilities. However, note that maintenance is aging (last release 396 days ago) and the project has minimal community activity (5 stars). It remains suitable for stable use cases but may not receive rapid updates for new HCL2 features or edge cases.

Install

bc-python-hcl2 on PyPI

Before you install

Low install friction with only two runtime dependencies (lark and importlib-resources). Maintenance status is aging—last release was 396 days ago and the repo shows minimal activity (5 stars), though it remains actively maintained and not archived.

Requires Python 3.8 or higher.

License in practice

MIT license is permissive, allowing use in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install bc-python-hcl2

import hcl2
with open('foo.tf', 'r') as file:
    config = hcl2.load(file)

Verify before relying

  • Completeness of HCL2 spec coverage beyond basic parsing—which features or edge cases may not be fully supported
  • Performance characteristics when parsing large or deeply nested configuration files
  • Whether the fork divergence from upstream python-hcl2 introduces breaking changes for existing users

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
larkimportlib-resources
MaintenanceAging 396 days since the last release
Last repo commit
First released
Downloads4,595,690 / month, #2,278 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: bc_python_hcl2-0.4.3-py3-none-any.whl

Tags

Capabilities
HCL2 parser PythonTerraform config parserHCL parser libraryparse HCL2 filesTerraform file parsingHCL configuration parserinfrastructure as code parsing
Topics
hcl2-parserterraforminfrastructure-as-code

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “infrastructure as code parsing”

  • bc-python-hcl2Parses HCL2 configuration files (such as Terraform configs) into…
  • tfparsetfparse parses and evaluates Terraform HCL configuration files using…
  • pycep-parserParses Azure Bicep infrastructure-as-code files into a structured…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also python-hcl2 · pyhcl · tfparse · tree-sitter-hcl · pycep-parser · cdktf · lark-parser · lark-js · python-terraform · lark