--- id: cheetah3 version: "3.2.6.post1" license: MIT license_treatment: permissive maintenance: active --- # Cheetah3 — Cheetah is a template engine and code generation tool License: permissive · Maintenance: active · Downloads: 405.8K/mo ## What it is and what it does Cheetah3 is a template engine that reads template files containing directives and variable placeholders, then generates output in any text-based format—HTML, code, configuration files, or plain text. It compiles templates into Python code for execution, making it suitable for both web frameworks and standalone code generation tasks. The package has no runtime dependencies and works across Python 2.7 and Python 3.4+, supporting both CPython and PyPy. Typical workflows involve writing a template with Cheetah syntax (variable substitution, conditionals, loops, function definitions), instantiating a Template object, and rendering it to a string. It's commonly used in web development to generate dynamic HTML, but also serves as a general-purpose code generator for C++, Java, SQL, and other languages. The fork maintains compatibility with the original CheetahTemplate library while adding support for modern Python versions. Use it for: - Generate dynamic HTML pages in web applications by embedding Cheetah templates in a framework. - Produce boilerplate code (C++, Java, Python) from template definitions during build or scaffolding steps. - Create form emails and notification templates with dynamic content substitution. - Generate SQL queries or configuration files from parameterized templates. - Standalone code generation tool for domain-specific languages or custom DSLs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cheetah3 is a template engine and code generator that transforms template files into Python, HTML, C++, Java, SQL, and other output formats. Yes, if you need a mature, dependency-free template engine with broad language support. Cheetah3 is stable, permissively licensed, and actively maintained. Install with caution if targeting Python versions beyond 3.8, as the latest release (2021-02-22) predates recent Python versions; verify compatibility for your specific version before committing to production use. ## Install pip install cheetah3 uv add cheetah3 poetry add cheetah3 ## Installing Cheetah3 Before you install: Medium install friction due to compiled wheels for multiple Python versions (2.7 through 3.8). Package is actively maintained with a recent commit on 2026-08-08, though the latest release was 2021-02-22, suggesting stable but infrequent updates. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute Cheetah3 freely as long as you include the license notice. Quickstart: pip install Cheetah3 from Cheetah.Template import Template template_text = '#def greet(name)\nHello $name!\n#end def\n$greet("World")' t = Template(template_text) print(t) Requires Python 2.7 or Python 3.4+ (not 3.0–3.3). Pre-built wheels are available for common platforms, but source installation may require a C compiler. Verify before relying: - Whether the package is actively developed or in maintenance-only mode given the gap between last release (2021-02-22) and current date. - Performance characteristics and typical use-case scale (e.g., template compilation speed, output size limits). - Compatibility with modern Python versions beyond 3.8 (classifiers list 3.9 but latest release predates widespread 3.9 adoption). ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 405.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags template engine python, code generation tool, dynamic content rendering, template language, text generation framework, html template processor, cheetah templating, template-engine, code-generation, no-dependencies [View on SkillFed](https://skillfed.io/packages/cheetah3) · [View on PyPI](https://pypi.org/project/cheetah3/)