skillfed

zope.tales

Zope Template Application Language Expression Syntax (TALES)

zope-tales v7.0 135.5K downloads/30d#11,426 on PyPI3
License unclear ZPL-2.1 AGING released

What it is and what it does

zope.tales is an expression language engine that interprets dynamic expressions within template contexts. It is designed primarily to integrate with zope.tal (Template Attribute Language) and zope.pagetemplate to enable server-side template rendering with dynamic variable substitution and expression evaluation. The package provides path expressions, string expressions, and other expression types that allow templates to reference variables, call methods, and perform conditional logic at render time.

The package depends on zope.interface for interface definitions and setuptools for packaging. It supports modern Python versions (3.9 through 3.13) and runs on both CPython and PyPy. The codebase has been maintained since 2007 and reached version 7.0 in 2025, with recent updates including PEP 420 namespace migration and Python 3.12/3.13 support. It is part of the broader Zope ecosystem and is typically used as a component within larger template-rendering systems rather than as a standalone tool.

Use it for:

  • Render Zope page templates with dynamic variable substitution and expression evaluation in web applications.
  • Evaluate path expressions to access nested object attributes and method results within template contexts.
  • Integrate expression evaluation into custom template engines or domain-specific languages built on Zope infrastructure.
  • Process string expressions with embedded variable references in server-side template rendering pipelines.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

zope.tales provides an expression language for evaluating dynamic expressions in template contexts, designed to work with zope.tal and zope.pagetemplate for server-side page template rendering.

Yes, if you are building or maintaining a Zope-based application or template system. The package is stable, has no known vulnerabilities, and supports current Python versions with low install friction. No, if you are starting a new project—modern alternatives like Jinja2 or Mako offer broader ecosystem support and more active development. The aging maintenance status and narrow use case (primarily Zope integration) make it a specialized tool rather than a general-purpose choice.

Install

zope-tales on PyPI

pip

pip install zope-tales

uv

uv add zope-tales

poetry

poetry add zope-tales

Installing zope.tales

Before you install

Low install friction with only two runtime dependencies (setuptools and zope.interface). The package is in aging maintenance status with the last commit on 2026-01-28, but remains actively supported for current Python versions (3.9 through 3.13).

License in practice

Licensed under ZPL-2.1 (Zope Public License), which is OSI-approved but has unclear treatment in some contexts. Verify compatibility with your project's license requirements before use.

Quickstart

pip install zope.tales

from zope.tales.engine import Engine
from zope.tales.tales import Context

engine = Engine()
context = Context(engine, {})
result = engine.compile('string:hello').eval(context)

Requires Python 3.9 or later; zope.interface must be installed as a runtime dependency.

Verify before relying

  • Whether the package is actively maintained or in long-term stable mode given the 336 days since last release.
  • Specific use cases beyond Zope framework integration where TALES expressions provide value over alternatives.

Package facts

License ZPL-2.1 (unclear)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — setuptools, zope.interface
Maintenance aging — 336 days since the last release
Last repo commit
First released
Downloads 135,505/month — #11,426 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: zope_tales-7.0-py3-none-any.whl

Keywords: zope, template, xml, tales

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: Zope :: 3Framework :: Zope :: 5Intended Audience :: DevelopersLicense :: OSI Approved :: Zope Public LicenseNatural Language :: EnglishOperating 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.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP

Tags

template expression languagezope page templatestales expression syntaxdynamic template evaluationzope tal integrationtemplate attribute language
zope-ecosystemtemplate-engine

More WWW/HTTP packages