--- id: empy version: "4.2.1" license: BSD license_treatment: permissive maintenance: aging --- # empy — A templating system for Python. License: permissive · Maintenance: aging · Downloads: 691.1K/mo ## What it is and what it does EmPy is a mature templating engine that lets you write Python code directly into template text using a customizable prefix (typically `@`) to mark where Python should execute. It processes a source document containing mixed text and Python markup, evaluates the Python portions, and outputs the results combined with the surrounding text. This turns Python into a markup language for code generation, document preprocessing, and text transformation. The package has no runtime dependencies and supports a wide range of Python implementations (CPython, PyPy, Jython, IronPython, Stackless). It's designed for developers who want lightweight, inline code generation without the overhead of a full templating framework. The aging maintenance status (last release 186 days ago) reflects a stable, mature tool rather than an actively developed one. Use it for: - Generate configuration files or source code by embedding Python logic in template text. - Preprocess documentation or markup files where dynamic content is computed from Python expressions. - Build simple code generators or boilerplate factories that mix static text with programmatic output. - Create custom report or document templates that evaluate Python at render time. - Automate repetitive text generation tasks in build pipelines or CI workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. EmPy is a templating system that embeds Python code directly into text documents using customizable markup (default `@`), processing the combined source to produce output with Python expressions, statements, and control structures evaluated inline. Yes, if you need lightweight inline templating without framework overhead and accept that maintenance is stable but not active. The permissive BSD license, zero runtime dependencies, and broad Python support make it low-risk for stable use cases. High install friction and aging status suggest it's best for established projects or one-off scripts rather than new, evolving applications. ## Install pip install empy uv add empy poetry add empy ## Installing empy Before you install: Installation friction is high; the package is aging (186 days since last release) with mature status but no recent repository activity signals available. Suitable for stable, long-term use cases where active maintenance is not a priority. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute EmPy freely provided you retain the license notice. Quickstart: pip install empy import empy empy.expand('@(2 + 2)', output=open('out.txt', 'w')) Requires Python >=2.4; no external runtime dependencies, but template processing depends on Python's eval/exec semantics. Verify before relying: - Whether the package runs reliably on modern Python 3 versions despite aging maintenance status. - Performance characteristics and scalability limits for large template files or complex embedded code. - Availability of comprehensive documentation or examples beyond the homepage. ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: high - Maintenance: aging - Downloads: 691.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python templating system, embed python in text, template preprocessing, python markup language, code generation from templates, text processing with python, template expansion, code-generation, preprocessing [View on SkillFed](https://skillfed.io/packages/empy) · [View on PyPI](https://pypi.org/project/empy/)