$npx skillfedfor your agent

pyhcl

HCL configuration parser for python

With conditionsPyPI Text ProcessingReleased Sep 20239.8M downloads / mocopyleft licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyhcl-0.4.5-py3-none-any.whl
v0.4.5 · released 2023-09-01

Yes, if you need to parse HCL1 or Terraform 0.12 configurations. The package is stable, has no dependencies, and installs easily. However, do not use it for modern Terraform (which requires HCL2 support); maintenance is aging with the last release in 2023-09-01, so expect limited support for new Python versions or edge cases. The copyleft license (MPL 2.0) requires disclosure of modifications if you redistribute derived work.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Does not support HCL2 syntax used by modern Terraform; designed for HCL1 and Terraform 0.12 and earlier.
  • Low install friction with no runtime dependencies.
  • Maintenance is aging—last release was 2023-09-01, though the repository remains active with a recent commit in 2026-01-20.

License · maintenance · safety

copyleft license (copyleft) — Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license requiring derivative works to disclose modifications and maintain the same license.

last release 2023-09-01 (1078 days) · last repo commit 2026-01-20 · 341 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 9,784,913 downloads/mo, #1,501 on PyPI

Verify before relying

pip install pyhcl

import pyhcl

with open('file.hcl', 'r') as fp:
    obj = pyhcl.load(fp)
  • Whether the package works reliably with current Python versions beyond those listed in classifiers.
  • Whether the Terraform 0.12 compatibility mentioned in the description covers all real-world use cases or only partial syntax.
  • Current maintenance status and likelihood of updates for edge cases or new Python versions.
Same gist for agents: .md · .json

What it is and what it does

pyhcl is a Python parser for HCL (HashiCorp Configuration Language), the configuration syntax used by Terraform and other HashiCorp tools. It reads HCL files and converts them into Python dictionaries, mirroring the interface of Python's built-in json module with load, loads, and dumps functions. The parser is based on the original Go implementation and aims for compatibility with it.

The package is designed for HCL1 syntax and has been modified to work with Terraform 0.12, but does not support HCL2, which is used by modern Terraform versions. It includes a command-line tool (hcltool) to convert HCL files to JSON. The output structure is a plain Python dictionary with no built-in schema validation; users are expected to validate the result separately using external tools if needed.

Use it for

  • Parse Terraform configuration files (0.12 and earlier) for programmatic inspection or transformation.
  • Convert HCL configuration files to JSON format using the included hcltool command-line utility.
  • Load HashiCorp tool configuration files into Python applications for dynamic configuration management.
  • Integrate HCL parsing into legacy systems that predate HCL2 and modern Terraform.

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 HCL1 or Terraform 0.12 configurations.

The package is stable, has no dependencies, and installs easily. However, do not use it for modern Terraform (which requires HCL2 support); maintenance is aging with the last release in 2023-09-01, so expect limited support for new Python versions or edge cases. The copyleft license (MPL 2.0) requires disclosure of modifications if you redistribute derived work.

Install

pyhcl on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is aging—last release was 2023-09-01, though the repository remains active with a recent commit in 2026-01-20.

Does not support HCL2 syntax used by modern Terraform; designed for HCL1 and Terraform 0.12 and earlier.

License in practice

Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license requiring derivative works to disclose modifications and maintain the same license.

Quickstart

pip install pyhcl

import pyhcl

with open('file.hcl', 'r') as fp:
    obj = pyhcl.load(fp)

Verify before relying

  • Whether the package works reliably with current Python versions beyond those listed in classifiers.
  • Whether the Terraform 0.12 compatibility mentioned in the description covers all real-world use cases or only partial syntax.
  • Current maintenance status and likelihood of updates for edge cases or new Python versions.

Package facts

Licensecopyleft license copyleft
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 1,078 days since the last release
Last repo commit
First released
Downloads9,784,913 / month, #1,501 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Text Processing

Evidence: pyhcl-0.4.5-py3-none-any.whl

Tags

Capabilities
HCL parser pythonhashicorp configuration languageparse terraform confighcl to json converterconfiguration file parsinghcl syntax parser
Topics
configuration-parsingterraform

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 › “HCL parser python”

  • pyhclParses HCL (HashiCorp Configuration Language) files into Python…
  • tree-sitter-hclProvides a tree-sitter parser grammar for HCL and Terraform, enabling…
  • bc-python-hcl2Parses HCL2 configuration files (such as Terraform configs) into…

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

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.

Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.

Install it if your project requires CSS tokenization or syntax manipulation.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also python-hcl2 · tfparse · bc-python-hcl2 · tree-sitter-hcl · hvac · cdktf · cdktf-cdktf-provider-aws · hjson · libconf · pytoml