skillfed

autowrapt

Boostrap mechanism for monkey patches.

autowrapt v1.0 223.2K downloads/30d#9,250 on PyPI32
Permissive license Abandoned released

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 autowrapt

uv

uv add autowrapt

poetry

poetry add autowrapt

Installing 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

License :: OSI Approved :: BSD License

Tags

monkey patching bootstrappost import hooksdynamic code patchingentrypoint-based patchingapplication instrumentation without code changeswrapt integration
monkey-patchinginstrumentationabandoned

More Software Development packages