--- id: pycep-parser version: "0.7.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pycep-parser — A Python based Bicep parser License: permissive · Maintenance: active · Downloads: 4.6M/mo ## What it is and what it does pycep-parser is a Python library that parses Azure Bicep files—a domain-specific language for defining Azure infrastructure—into an abstract syntax tree (AST) using the Lark parser framework. It lets you programmatically read and analyze Bicep templates rather than treating them as opaque text, enabling tooling, validation, and transformation workflows. The package is actively maintained and supports modern Python versions (3.10–3.14). Its three runtime dependencies are all lightweight and widely used. However, the documentation notes that support is still incomplete for some Bicep features (custom data types with decorators, union types in objects, and certain built-in functions like CIDR and Lambda), so it may not parse every valid Bicep file yet. Use it for: - Validate Bicep templates programmatically before deployment to catch syntax or structural errors early. - Extract metadata from Bicep files (parameters, outputs, resource definitions) for documentation or inventory tools. - Build linting or code-quality tools that analyze Bicep templates for best practices and compliance. - Integrate Bicep parsing into CI/CD pipelines to gate deployments on template analysis results. - Generate reports or visualizations of infrastructure defined in Bicep files. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses Azure Bicep infrastructure-as-code files into a structured representation using Lark, enabling programmatic analysis and manipulation of Bicep templates. Yes, if you need to parse Bicep files programmatically. The package is actively maintained, has low install friction, carries a permissive license, and has no known vulnerabilities. Be aware that support for some Bicep language features is still incomplete; check the capabilities documentation to confirm it handles your template syntax before relying on it in production. ## Install pip install pycep-parser uv add pycep-parser poetry add pycep-parser ## Installing pycep-parser Before you install: Low friction install with three lightweight runtime dependencies (lark, regex, typing-extensions). Active maintenance with a release within the last week and ongoing development; requires Python 3.10 or later. License in practice: Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restrictions. Quickstart: pip install pycep-parser from pycep_parser import parse_file ast = parse_file('template.bicep') Requires Python 3.10 or later; Lark 1.1.2 or later must be available. Verify before relying: - Whether the parser handles all current Bicep language features or only a subset (docs reference incomplete support for decorators, union types, and some functions). - Performance characteristics when parsing large or complex Bicep templates. - Whether the AST output is stable across releases or subject to breaking changes. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags bicep file parser, azure bicep parsing, infrastructure as code parser, bicep template analysis, bicep syntax tree, lark-based bicep parser, bicep ast extraction, bicep, infrastructure-as-code, parser [View on SkillFed](https://skillfed.io/packages/pycep-parser) · [View on PyPI](https://pypi.org/project/pycep-parser/)