Installation¶
Complete installation guide for pyvider-hcl.
Prerequisites¶
Installing UV¶
Python Version Setup¶
Virtual Environment¶
Installing pyvider-hcl¶
Using UV (Recommended)¶
Using pip¶
From Source¶
For development or accessing the latest features:
# Clone the repository
git clone https://github.com/provide-io/pyvider-hcl.git
cd pyvider-hcl
# Set up environment and install
uv sync
# Verify installation
python -c "import pyvider.hcl; print('✅ pyvider-hcl installed')"
Verification¶
After installation, verify everything works:
# Check Python version
python --version # Should show 3.11+
# Verify package installation
python -c "import pyvider.hcl; print(pyvider.hcl.__version__)"
# Run a simple parse test
python -c "from pyvider.hcl import parse_hcl_to_cty; result = parse_hcl_to_cty('name = \"test\"'); print('✅ HCL parsing works')"
Dependencies¶
pyvider-hcl requires:
- python-hcl2: HCL parsing library
- pyvider-cty: CTY type system integration
- provide-foundation: Logging and error handling
- regex: Enhanced regular expression support
These are installed automatically when you install pyvider-hcl.
Troubleshooting¶
HCL-Specific Issues¶
Problem: ImportError: cannot import name 'parse_hcl_to_cty'
Solution: Ensure you have the latest version installed:
Problem: HCL parsing errors
Solution: Verify your HCL syntax:
- Check for proper quoting of strings
- Ensure proper nesting of blocks
- Validate type expressions (e.g., list(string))
Next Steps¶
After installation:
- Getting Started - Learn HCL parsing basics
- User Guide - Comprehensive usage examples
- API Reference - Complete API documentation