autowrapt
Boostrap mechanism for monkey patches.
What it is and what it does
Autowrapt is a bootstrap mechanism that applies monkey patches to Python applications at import time using setuptools entrypoints, without requiring changes to the application code itself. It works by reading entrypoint names from the AUTOWRAPT_BOOTSTRAP environment variable and activating post-import hooks defined in those entrypoints, allowing instrumentation or modification of module behavior transparently.
The package is designed to work in conjunction with wrapt, which provides the underlying patching infrastructure. Users define patch modules following wrapt conventions, register them as setuptools entrypoints, and then set the environment variable to activate them when running Python. This approach is useful for adding instrumentation, tracing, or behavioral modifications to applications without source code edits.
Use it for:
- Add tracing or monitoring to a third-party Python application by installing autowrapt and setting AUTOWRAPT_BOOTSTRAP to activate instrumentation hooks.
- Inject performance profiling or debugging code into an application at runtime without modifying its source.
- Apply security patches or behavioral fixes to existing applications through post-import hooks registered as entrypoints.
- Instrument library code for observability in a deployed application without code changes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Autowrapt enables monkey patching of Python applications via setuptools entrypoints and environment variables, without modifying the application code itself.
No. The package is abandoned (last release 2015-04-09 with no updates since) with high install friction from source distribution. While it carries no known vulnerabilities and uses a permissive license, the lack of maintenance means no compatibility assurance with modern Python versions, no bug fixes, and no support. Use only if you have an existing codebase already depending on it.
Install
autowrapt on PyPI
pip
pip install autowraptuv
uv add autowraptpoetry
poetry add autowraptInstalling autowrapt
Before you install
High install friction due to source distribution format. Package is abandoned—last release was 2015-04-09 with no updates since, though the repository remains unarchived.
License in practice
Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions, though the abandoned status means no ongoing license maintenance or clarification.
Quickstart
# Install autowrapt
pip install autowrapt
# Set bootstrap entrypoint and run Python
AUTOWRAP_BOOTSTRAP=autowrapt.examples python
# At the interpreter, import a module to trigger patches
import this
Requires wrapt module to be installed separately and post-import hook patch modules to be defined per wrapt requirements.
Verify before relying
- Whether autowrapt remains compatible with modern Python versions given the 2015-04-09 release date and no subsequent updates.
- Whether wrapt is an explicit runtime dependency or must be installed separately by the user.
- Current real-world usage patterns and whether the package is actively used in production systems.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 4,145 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 223,199/month — #9,250 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: autowrapt-1.0.tar.gz
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI 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
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
wraptwrapt provides a Python module for building…
permissive · top 100 on PyPI
patchyPatchy modifies Python functions at runtime by…
permissive · top 5,000 on PyPI
pyproject-flake8Enables flake8 linting to read configuration…
unclear · top 15,000 on PyPI
zipfile-zstdExtends Python's standard zipfile module to…
permissive · top 5,000 on PyPI
django-bootstrap-formRenders Django form fields as Bootstrap-styled…
permissive · top 15,000 on PyPI
entrypointsDiscovers and loads entry points from installed…
permissive · top 1,000 on PyPI
pytest-mockProvides a pytest fixture that wraps the mock…
permissive · top 1,000 on PyPI
stevedoreStevedore manages dynamic plugin loading for…
permissive · top 1,000 on PyPI
patchParses and applies unified diff patches to…
permissive · top 15,000 on PyPI
jinjanator-pluginsProvides the plugin API and hook decorators…
permissive · top 5,000 on PyPI