--- id: pyyml version: "0.0.2" license: MIT license_treatment: permissive maintenance: abandoned --- # pyyml — Use python in yaml License: permissive · Maintenance: abandoned · Downloads: 432.7K/mo ## What it is and what it does pyyml extends YAML parsing to allow Python code execution within YAML files. When you load a YAML file through pyyml, any expression wrapped in ${...} is evaluated as Python code and replaced with its result. You can also import packages at the top of your YAML file using a special # libs:[...] comment syntax, making those modules available to your expressions. This is useful for configuration files that need computed values—file paths, sums, environment-dependent settings—without leaving YAML syntax. However, the package has received no maintenance since its initial release in April 2019 and depends on pyyaml, which has evolved significantly. The security model of executing arbitrary Python in YAML requires careful vetting of configuration sources. Use it for: - Generate computed configuration values (e.g., derived paths, sums) directly in YAML without post-processing - Build environment-aware configs that reference os or other standard library modules within YAML - Reduce boilerplate by embedding simple Python logic in configuration files instead of wrapper scripts ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Embeds Python expressions directly in YAML files, evaluating them at parse time to generate dynamic configuration values. No. The package is abandoned with no updates since April 2019, and its security model—executing Python code embedded in YAML—poses risks if configuration sources are untrusted. Modern alternatives or explicit post-processing of YAML are safer. Only consider it for legacy systems already using it. ## Install pip install pyyml uv add pyyml poetry add pyyml ## Installing pyyml Before you install: Low install friction with a single dependency (pyyaml), but the package has been abandoned since its initial release in April 2019 with no updates or maintenance. License in practice: MIT license permits commercial and private use with minimal restrictions, though the abandoned status means no ongoing legal or security review. Quickstart: from pyyml import load with open('conf.yml') as f: config = load(f.read()) # YAML file with: sum: ${1 + 1} # Results in: {'sum': 2} Requires pyyaml as a runtime dependency; YAML files must use ${...} syntax for Python expressions and optional # libs:[...] header for imports. Verify before relying: - Whether the package works reliably with current Python versions, given its age and lack of maintenance - Security implications of executing arbitrary Python code embedded in YAML files during parsing - Compatibility with modern pyyaml versions and whether breaking changes have occurred ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 432.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python expressions in yaml, dynamic yaml configuration, yaml with code evaluation, templated yaml files, yaml config with python, executable yaml, yaml python interpolation, yaml-templating, abandoned [View on SkillFed](https://skillfed.io/packages/pyyml) · [View on PyPI](https://pypi.org/project/pyyml/)