--- id: pyramid-retry version: "2.1.1" license: unclear license_treatment: permissive maintenance: active --- # pyramid-retry — An execution policy for Pyramid that supports retrying requests after certain failure exceptions. License: permissive · Maintenance: active · Downloads: 79.1K/mo ## What it is and what it does pyramid_retry is an execution policy for the Pyramid web framework that intercepts request handling and automatically retries failed requests under certain conditions. When a request raises an exception that the policy considers retryable, it will attempt to re-execute the request up to a configurable limit before allowing the error to propagate. The policy is configured via settings and can be customized per-request through hooks; it also fires events before each retry attempt, allowing applications to perform cleanup or state management. The package depends on pyramid and zope.interface and integrates directly into Pyramid's request/response cycle. It is useful for handling transient failures in web applications—network glitches, temporary resource unavailability, or other recoverable errors—without requiring explicit retry logic in application code. Use it for: - Automatically retry requests that fail due to transient database connection issues or temporary service unavailability. - Handle client disconnects gracefully by ensuring threadlocals are cleaned up even when retries fail. - Implement per-request retry limits using a custom activate_hook to vary retry behavior based on request properties. - Subscribe to IBeforeRetry events to reset request state or clean up resources before each retry attempt. - Mark specific exceptions as retryable using mark_error_retryable so the policy knows which errors warrant a retry. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyramid_retry wraps Pyramid requests with configurable retry logic, automatically retrying requests under specified error conditions before reporting failure to the client. Yes, if you are building a Pyramid application and need automatic retry logic for transient failures. The package is stable (Production/Stable status), has low install friction, and is actively maintained. However, note that the last release was in 2020; verify compatibility with your Pyramid version before adopting. ## Install pip install pyramid-retry uv add pyramid-retry poetry add pyramid-retry ## Installing pyramid-retry Before you install: Low install friction: pure Python wheel with only two runtime dependencies (pyramid and zope.interface). Maintenance status is active with recent commits, though the last release was in 2020. License in practice: MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install pyramid-retry from pyramid.config import Configurator config = Configurator() config.include('pyramid_retry') Requires Pyramid framework to be installed and configured; pyramid_retry is an execution policy that integrates into Pyramid's request handling pipeline. Verify before relying: - Whether the package supports Python versions beyond 3.7 (classifiers list 3.7 as the latest tested version). - Current compatibility with modern Pyramid versions (last release was 2020; Pyramid may have evolved significantly). ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 79.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pyramid request retry, wsgi retry policy, automatic request retry, pyramid error recovery, configurable retry attempts, pyramid execution policy, transient error handling, pyramid-plugin, fault-tolerance, wsgi [View on SkillFed](https://skillfed.io/packages/pyramid-retry) · [View on PyPI](https://pypi.org/project/pyramid-retry/)