DocumentTemplate
Document Templating Markup Language (DTML)
Decision gist · record as of 2026-08-14
Yes, but only if you are maintaining or extending an existing Zope application that uses DTML. Do not install for new projects—use modern templating systems instead. The package is actively maintained, has no known vulnerabilities, and installs with low friction. License treatment is unclear; verify ZPL-2.1 compliance for your use case before deployment.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Designed primarily for Zope environments; standalone use outside Zope may require additional setup for full functionality.
- Low friction installation with a pure-Python implementation and no compiled dependencies.
License · maintenance · safety
ZPL-2.1 (unclear) — Licensed under ZPL-2.1 (Zope Public License 2.1), though license treatment is marked unclear in the metadata. Verify compliance requirements before use in proprietary or commercial projects.
last release 2026-02-25 (170 days) · last repo commit 2026-02-25 · 7 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,830 downloads/mo, #11,386 on PyPI
Alternatives
Verify before relying
pip install DocumentTemplate
from DocumentTemplate import HTML
template = HTML('<dtml-var name>')
result = template(name='Hello')- Whether DTML templates can be safely used with untrusted input given the RestrictedPython dependency and its security model.
- Current adoption rate and whether new projects should use DTML or migrate to modern Zope templating (TAL/page templates).
- Specific performance characteristics compared to modern template engines.
What it is and what it does
DocumentTemplate is a legacy templating system from the Zope framework that processes DTML (Document Templating Markup Language)—a custom SGML-based markup for embedding dynamic content in HTML and SQL templates. It provides variable substitution, conditional blocks, loops, and other programmatic features through custom tags like `<dtml-var>`, `<dtml-if>`, and `<dtml-in>`.
The package is now primarily maintained for backward compatibility with existing Zope applications. Modern Zope environments have largely moved to TAL (Template Attribute Language) and page templates for new development. It depends on Zope security and object-access infrastructure (AccessControl, Acquisition, RestrictedPython) and integrates with zope.sequencesort for sorting operations. The implementation is pure Python as of version 3.0, with no compiled dependencies.
Use it for
- Maintaining or extending legacy Zope applications that use DTML templates for dynamic page generation.
- Rendering HTML or SQL templates with variable substitution and conditional logic in Zope-based systems.
- Processing DTML documents that require restricted execution contexts for security-sensitive applications.
- Migrating or refactoring older Zope codebases while preserving existing DTML template functionality.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, but only if you are maintaining or extending an existing Zope application that uses DTML.
Do not install for new projects—use modern templating systems instead. The package is actively maintained, has no known vulnerabilities, and installs with low friction. License treatment is unclear; verify ZPL-2.1 compliance for your use case before deployment.
Install
documenttemplate on PyPI
Before you install
Low friction installation with a pure-Python implementation and no compiled dependencies. Actively maintained with recent releases; last commit on 2026-02-25. Requires Python 3.10 or later.
Requires Python 3.10 or later. Designed primarily for Zope environments; standalone use outside Zope may require additional setup for full functionality.
License in practice
Licensed under ZPL-2.1 (Zope Public License 2.1), though license treatment is marked unclear in the metadata. Verify compliance requirements before use in proprietary or commercial projects.
Quickstart
pip install DocumentTemplate
from DocumentTemplate import HTML
template = HTML('<dtml-var name>')
result = template(name='Hello')
Verify before relying
- Whether DTML templates can be safely used with untrusted input given the RestrictedPython dependency and its security model.
- Current adoption rate and whether new projects should use DTML or migrate to modern Zope templating (TAL/page templates).
- Specific performance characteristics compared to modern template engines.
Package facts
| License | ZPL-2.1 unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesAccessControlAcquisitionExtensionClassRestrictedPythonromanzExceptionszope.sequencesortzope.structuredtext |
| Maintenance | Actively maintained 170 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,830 / month, #11,386 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 6 - MatureEnvironment :: Web EnvironmentFramework :: ZopeFramework :: Zope :: 5Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Text Processing :: Markup |
Evidence: documenttemplate-5.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “DTML template engine”
- DocumentTemplateDocumentTemplate implements the Document Templating Markup Language…
- liquidpyLiquidpy is a Python port of the Liquid template engine built on…
- ChameleonChameleon is an HTML/XML template engine that compiles page templates…
Give your agent the search over MCP, or paste the wish link into any chat.
More Markup packages
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.
Install it if you need reliable markdown-to-HTML conversion.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.
Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.
Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.
Install it if you're building tools that touch TOML files and user readability of the source matters.
Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.
Install it if you need to programmatically read and extract structured data from Python docstrings.
See also empy · zope.pagetemplate · zope.tal · poml · zope.tales · sgmllib3k · zope.configuration · zope.structuredtext · zope.contentprovider · ZConfig