zope.globalrequest
Global way of retrieving the currently active request.
What it is and what it does
zope.globalrequest is a small utility that exposes a single function, getRequest(), to retrieve the currently active HTTP request object in Zope and Plone web applications without threading it through function parameters. It works by hooking into Zope's request-handling machinery via zope.publisher and zope.traversing.
The package is explicitly designed for the Zope/Plone ecosystem, where it serves as a convenience for accessing request context. The Zope3 framework itself discourages this pattern in favor of explicit dependency injection, so this package is most relevant for legacy Plone codebases or projects that prioritize pragmatism over strict separation of concerns. It has no external dependencies beyond the Zope framework stack itself.
Use it for:
- Retrieve the current HTTP request in Plone add-ons without modifying function signatures throughout the codebase.
- Access request headers, form data, or session information from deeply nested utility functions in Zope applications.
- Migrate legacy Plone code that relies on implicit request availability to modern Python versions.
- Implement request-scoped caching or logging in Zope middleware without explicit parameter passing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a function to retrieve the currently active request object in Zope-based web frameworks without passing it through function parameters.
Yes, if you are actively developing or maintaining Plone or Zope applications. The package is stable, has no known vulnerabilities, and installs with low friction. No, if you are starting a new Zope3 project or prefer explicit dependency injection patterns. The aging maintenance status (336 days since last release) is not a blocker for a stable utility, but verify that your Zope/Plone version is compatible before relying on it for new projects.
Install
zope-globalrequest on PyPI
pip
pip install zope-globalrequestuv
uv add zope-globalrequestpoetry
poetry add zope-globalrequestInstalling zope.globalrequest
Before you install
Low friction installation with a pure-Python wheel. Maintenance is aging—last release was 336 days ago—but the package remains active on the Zope Foundation repository and supports current Python versions (3.9–3.13).
License in practice
Licensed under ZPL (Zope Public License), which is OSI-approved. License treatment is marked unclear in the fact sheet, so verify the specific terms if your project has strict licensing requirements.
Quickstart
pip install zope.globalrequest
from zope.globalrequest import getRequest
request = getRequest()
Requires Python 3.9 or later. Intended for use within Zope or Plone web frameworks; behavior outside those contexts is not documented.
Verify before relying
- Whether getRequest() returns None or raises an exception when called outside an active Zope request context.
- Performance implications of global request retrieval in high-concurrency scenarios.
- Compatibility with async/ASGI-based Zope deployments.
Package facts
| License | ZPL (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — setuptools, zope.interface, zope.publisher, zope.traversing |
| Maintenance | aging — 336 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,023/month — #11,839 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: zope_globalrequest-3.0-py3-none-any.whl
Keywords: zope, request, global
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
zope.annotationStores additional metadata on objects without…
unclear · top 15,000 on PyPI
zope.ptresourceProvides a resource class that processes Zope…
unclear · top 15,000 on PyPI
zope.sizeProvides a standard interface and adapter for…
unclear · top 15,000 on PyPI
zope.proxyzope.proxy provides transparent wrapper objects…
unclear · top 15,000 on PyPI
zope.viewletzope.viewlet provides a pluggable framework for…
unclear · top 15,000 on PyPI
zope.testbrowserzope.testbrowser provides a programmable web…
unclear · top 15,000 on PyPI
ZopeZope is an open-source web application server…
unclear · top 15,000 on PyPI
zope.lifecycleeventDefines event objects and API functions for…
unclear · top 15,000 on PyPI
zope.filerepresentationDefines interfaces for representing objects as…
unclear · top 15,000 on PyPI
PersistenceProvides a persistent base class built on…
unclear · top 15,000 on PyPI