Registry / web-framework / z3c-pt

z3c-pt

JSON →
library5.1pypypiunverified

Fast Zope Page Templates (ZPT) engine implementing TAL/TALES/METAL specifications. Version 5.1 requires Python >=3.9. Releases are stable and infrequent, focusing on maintenance.

pip install z3c.pt
INSTALL
IMPORT
SIG · Z3C-PT
Z
z3c-pt
web-frameworkpythonv5.1
Install
4.3s avg
Import
Disk
38MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 35.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.3s · import 0.000s · 36MB
38MB installed
● package 38MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PageTemplate
from z3c.pt import PageTemplate
from z3c.pt import PageTemplate

Compiles a ZPT template string and renders it with a context dictionary.

from z3c.pt import PageTemplate, getEngine engine = getEngine() template = engine.compile('<html><body><p tal:content="message"></p></body></html>') # For a simple render, use the template directly (requires context) # engine = engine # no context needed for compile, but rendering needs dict result = template({'message': 'Hello, world!'}) print(result)
Debug
Known issues
breakingIn version 5.0, the package was split from `z3c.pt` standalone; previously it was part of `z3c.template`. If upgrading from older versions (pre-5.0), imports and API changed. Ensure you are using `z3c.pt` directly.
fix
Update imports from e.g. `z3c.template` to `z3c.pt` and adjust API usage per current docs.
affects: <5.0
deprecatedThe `z3c.pt` package now requires Python 3.9+. Python 2.7 and 3.5-3.8 are no longer supported.
fix
Upgrade to Python 3.9 or later.
affects: >=5.0
gotchaTAL expressions like `tal:content` expect Python expressions, not paths. A common mistake is using dotted paths like `tal:content="context/some"` which is Zope-specific. For standalone use, provide a dict with keys as variable names.
fix
Use simple Python expressions in TAL attributes, e.g., `tal:content="variable"`.
affects: all
Upgrade
Version history
5.1latest on PyPI · released Jun 19, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
z3c-pt — pip install z3c-pt · libregistry