zope.pagetemplate
Zope Page Templates
What it is and what it does
zope.pagetemplate is a templating engine built on Template Attribute Language (TAL) and TALES expressions that lets designers work with templates in standard visual editing tools while keeping presentation markup separate from application logic. It has been part of the Zope ecosystem since 2007 and is actively maintained for modern Python versions.
The package works by parsing template files and evaluating expressions embedded in template attributes. It depends on a stack of zope libraries (zope.interface, zope.component, zope.tal, zope.tales, zope.i18n, zope.i18nmessageid, and zope.traversing) to handle interface registration, component lookup, TAL parsing, expression evaluation, and internationalization. It is most commonly used within Zope-based applications or projects that need a declarative, attribute-driven templating approach.
Use it for:
- Building server-side HTML templates in Zope applications where TAL syntax and TALES expressions are the standard.
- Separating presentation markup from Python logic in web applications that prioritize designer-friendly template syntax.
- Rendering dynamic content with path expressions, string interpolates, and conditional/repetition directives in TAL.
- Integrating templates that can be edited in visual design tools (FrontPage, Dreamweaver, etc.) without breaking markup structure.
- Implementing macro-based template inheritance and reuse within a Zope component architecture.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
zope.pagetemplate provides a templating system that separates presentation logic from application code using Template Attribute Language (TAL) and TALES expressions, allowing designers to edit templates in visual tools.
Yes, if you are working within the Zope ecosystem or need a declarative, attribute-driven templating system compatible with visual design tools. The package is actively maintained, has no known vulnerabilities, and supports current Python versions. However, it is a specialized tool with a narrow user base outside Zope; most modern web projects use Jinja2, Django templates, or similar. Install only if your project already depends on Zope or you specifically need TAL/TALES syntax.
Install
zope-pagetemplate on PyPI
pip
pip install zope-pagetemplateuv
uv add zope-pagetemplatepoetry
poetry add zope-pagetemplateInstalling zope.pagetemplate
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases; last commit 2026-02-18 and version 6.1 released 2025-11-21. Supports current Python versions (3.10–3.14) and PyPy.
License in practice
Licensed under ZPL-2.1 (Zope Public License 2.1), classified as OSI-approved. License treatment marked unclear in the fact sheet; review the actual license terms before use in proprietary or restricted contexts.
Quickstart
from zope.pagetemplate.pagetemplate import PageTemplate
template = PageTemplate("<div tal:content='string:Hello World' />")
result = template()
Requires Python 3.10 or later; depends on zope.interface, zope.component, zope.tal, zope.tales, and zope.i18n packages.
Verify before relying
- Whether the 'untrusted' extra (zope.untrustedpython) is necessary for production use cases involving untrusted template input.
- Performance characteristics and scalability limits for large template volumes or complex expression evaluation.
- Compatibility with modern web frameworks (Django, FastAPI, etc.) or whether it is primarily used within Zope ecosystem projects.
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 — setuptools, zope.interface, zope.component, zope.tales, zope.tal, zope.i18n, zope.i18nmessageid, zope.traversing |
| Maintenance | actively maintained — 266 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 138,205/month — #11,338 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: zope_pagetemplate-6.1-py3-none-any.whl
Keywords: zope3, page, template
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
DocumentTemplateDocumentTemplate implements the Document…
unclear · top 15,000 on PyPI
z3c.ptz3c.pt is a fast ZPT (Zope Page Template)…
unclear · top 15,000 on PyPI
zope.taleszope.tales provides an expression language for…
unclear · top 15,000 on PyPI
zope.talzope.tal implements the Template Attribute…
unclear · top 15,000 on PyPI
zope.contentproviderProvides a framework for building componentized…
unclear · top 15,000 on PyPI
zope.viewletzope.viewlet provides a pluggable framework for…
unclear · top 15,000 on PyPI
zope.structuredtextParses and renders Zope structured text (STX),…
unclear · top 15,000 on PyPI
zope.browserpageProvides ZCML directives (browser:page,…
unclear · top 15,000 on PyPI
zope.ptresourceProvides a resource class that processes Zope…
unclear · top 15,000 on PyPI
ChameleonChameleon is an HTML/XML template engine that…
permissive · top 15,000 on PyPI