venusian
A library for deferring decorator actions
What it is and what it does
Venusian is a decorator deferral library used primarily by web frameworks and Zope-based systems. Instead of executing decorator logic when a function or class is decorated at import time, venusian lets you attach metadata to the decorated object and then run all registered callbacks during a separate "scan" phase. This separation is useful when you need to defer decisions until after all modules are loaded, or when you want to collect and process decorations in batch.
The library works by attaching callbacks to decorated objects via a `__venusian_callbacks__` attribute, then providing a Scanner that walks through packages and modules to invoke those callbacks. It handles edge cases like inherited decorations, imported objects that shouldn't be double-scanned, and metaclasses that don't behave normally. Venusian has no runtime dependencies and supports Python 3.7 through 3.13 on both CPython and PyPy.
Use it for:
- Building web frameworks that need to collect route or view decorations from multiple modules before setting up routing tables.
- Implementing plugin systems where decorators mark plugin entry points but registration must happen after all modules load.
- Creating configuration systems that defer decorator-driven setup until after dependency injection or configuration is complete.
- Zope-based applications that use decorators to register adapters, utilities, or event handlers in a deferred manner.
- Testing frameworks that need to collect test markers or fixtures from decorated functions without executing them at import time.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Venusian defers decorator actions from import time to a separate scan phase, allowing framework authors to register decorated functions and classes after modules are loaded rather than at decoration time.
Yes, if you are building a framework or plugin system that benefits from deferred decorator registration. Venusian is mature, well-tested, and has no dependencies. However, it is dormant (620 days since last release), so adopt it only if you are comfortable with minimal ongoing maintenance and can handle any issues yourself. For typical application code, you likely don't need it.
Install
venusian on PyPI
pip
pip install venusianuv
uv add venusianpoetry
poetry add venusianInstalling venusian
Before you install
Low friction: pure Python wheel with no runtime dependencies. Dormant maintenance (620 days since last release), but marked Mature and actively supports current Python versions through 3.13.
License in practice
BSD-derived Repoze license is permissive; you can use venusian in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install venusian
from venusian import Scanner
scanner = Scanner()
scanner.scan()
Verify before relying
- Whether the scan phase can handle circular imports or complex module dependency graphs.
- Performance characteristics when scanning large codebases with many decorated objects.
- Specific use cases and integration patterns beyond the Pylons/Zope ecosystem.
Package facts
| License | BSD-derived (Repoze) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 620 days since the last release |
| First released | |
| Downloads | 2,893,607/month — #2,835 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: venusian-3.1.1-py3-none-any.whl
Keywords: web, wsgi, zope
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
undecoratedStrips decorators from Python functions,…
permissive · top 15,000 on PyPI
zope.deferredimportDefers module imports until they are actually…
unclear · top 15,000 on PyPI
botoinatorBotoinator lets you attach decorators to boto3…
permissive · top 15,000 on PyPI
overridesProvides a @override decorator that validates…
permissive · top 1,000 on PyPI
deprecationProvides decorators to automate deprecation…
permissive · top 1,000 on PyPI
decoratorProvides utilities for writing function…
permissive · top 1,000 on PyPI
wraptwrapt provides a Python module for building…
permissive · top 100 on PyPI
backoffProvides function decorators to automatically…
permissive · top 1,000 on PyPI
async-propertyProvides Python decorators (@async_property and…
permissive · top 5,000 on PyPI
zope.deprecationProvides a decorator and utilities to mark…
unclear · top 5,000 on PyPI