$npx skillfedfor your agent

tfparse

Python HCL/Terraform parser via extension for AquaSecurity defsec

With conditionsPyPI Build ToolsReleased May 2026156.6K downloads / moApache-2.0Platform wheel

Decision gist · record as of 2026-08-14

platform wheels — tfparse-0.6.20-cp310-cp310-macosx_10_9_x86_64.whl · tfparse-0.6.20-cp310-cp310-macosx_11_0_arm64.whl · tfparse-0.6.20-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
v0.6.20 · released 2026-05-28 · 1 runtime deps: cffi

Yes, if you need to parse and evaluate Terraform configurations in Python. The package is actively maintained, has no known vulnerabilities, and uses a permissive license. Install friction is moderate due to compiled extensions, but prebuilt wheels cover common platforms. Note the Windows memory management caveat if that is a deployment target.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires terraform init to have been run on the target directory to resolve module references.
  • Medium install friction due to compiled C extensions (cffi-based bindings to Go).
  • Prebuilt wheels available for Python 3.10–3.14 on macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restrictions.

last release 2026-05-28 (78 days) · last repo commit 2026-07-01 · 57 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 156,620 downloads/mo, #10,780 on PyPI

Verify before relying

pip install tfparse
from tfparse import load_from_path
parsed = load_from_path('path_to_terraform_root')
print(parsed.keys())
  • Memory management on Windows (documentation notes memory is not freed on parse results; impact on long-running or high-volume parsing unclear).
  • Exact scope of Terraform version compatibility and which HCL2 features are fully supported.
  • Performance characteristics and scalability limits for large module hierarchies.
Same gist for agents: .md · .json

What it is and what it does

tfparse is a Python extension that wraps Go bindings to Terraform's canonical HCL parser and the defsec evaluation engine. It handles the full complexity of Terraform configuration parsing, including variable interpolation, function evaluation, and expression resolution—going beyond what a standard HCL parser can do. The library exposes a high-level Python interface to load and inspect parsed Terraform modules as dictionaries.

The package is built on cffi bindings to Go code and ships precompiled wheels for common platforms. It is intended for developers who need to programmatically analyze or process Terraform configurations in Python, such as linting tools, policy engines, or infrastructure scanning utilities.

Use it for

  • Analyze Terraform modules programmatically to extract resource definitions and validate configurations.
  • Build policy-as-code or compliance scanning tools that need to understand Terraform state and expressions.
  • Integrate Terraform parsing into Python-based infrastructure-as-code tooling or CI/CD pipelines.
  • Extract metadata from Terraform modules for documentation generation or dependency mapping.
  • Validate Terraform configurations before deployment by inspecting parsed structure and values.

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 and evaluate Terraform configurations in Python.

The package is actively maintained, has no known vulnerabilities, and uses a permissive license. Install friction is moderate due to compiled extensions, but prebuilt wheels cover common platforms. Note the Windows memory management caveat if that is a deployment target.

Install

tfparse on PyPI

Before you install

Medium install friction due to compiled C extensions (cffi-based bindings to Go). Prebuilt wheels available for Python 3.10–3.14 on macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows. Active maintenance with a recent release.

Requires terraform init to have been run on the target directory to resolve module references.

License in practice

Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restrictions.

Quickstart

pip install tfparse
from tfparse import load_from_path
parsed = load_from_path('path_to_terraform_root')
print(parsed.keys())

Verify before relying

  • Memory management on Windows (documentation notes memory is not freed on parse results; impact on long-running or high-volume parsing unclear).
  • Exact scope of Terraform version compatibility and which HCL2 features are fully supported.
  • Performance characteristics and scalability limits for large module hierarchies.

Package facts

LicenseApache-2.0 permissive
Python supportNot specified
Install frictionMedium. Platform-specific wheel
Runtime dependencies
1 package
cffi
MaintenanceActively maintained 78 days since the last release
Last repo commit
First released
Downloads156,620 / month, #10,780 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: tfparse-0.6.20-cp310-cp310-macosx_10_9_x86_64.whl; tfparse-0.6.20-cp310-cp310-macosx_11_0_arm64.whl; tfparse-0.6.20-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; tfparse-0.6.20-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; tfparse-0.6.20-cp310-cp310-win_amd64.whl; tfparse-0.6.20-cp311-cp311-macosx_10_9_x86_64.whl; tfparse-0.6.20-cp311-cp311-macosx_11_0_arm64.whl; tfparse-0.6.20-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; tfparse-0.6.20-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; tfparse-0.6.20-cp311-cp311-win_amd64.whl; tfparse-0.6.20-cp312-cp312-macosx_10_13_x86_64.whl; tfparse-0.6.20-cp312-cp312-macosx_11_0_arm64.whl; tfparse-0.6.20-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; tfparse-0.6.20-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; tfparse-0.6.20-cp312-cp312-win_amd64.whl; tfparse-0.6.20-cp313-cp313-macosx_10_13_x86_64.whl; tfparse-0.6.20-cp313-cp313-macosx_11_0_arm64.whl; tfparse-0.6.20-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; tfparse-0.6.20-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; tfparse-0.6.20-cp313-cp313-win_amd64.whl

Tags

Capabilities
terraform hcl parserparse terraform modulesterraform configuration parsinghcl evaluationterraform ast extractioninfrastructure as code parsingterraform file analysis
Topics
terraforminfrastructure-as-codehcl-parser

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 › “parse terraform modules”

  • tfparsetfparse parses and evaluates Terraform HCL configuration files using…
  • bc-python-hcl2Parses HCL2 configuration files (such as Terraform configs) into…
  • tftestWraps the Terraform executable to facilitate testing Terraform…

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

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also pyhcl · bc-python-hcl2 · tree-sitter-hcl · python-hcl2 · tftest · cdktf · python-terraform · terraform-compliance · terraform-local · cdktf-cdktf-provider-aws