{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/3"}],"enrichment":{"capability":"Integrates Pyramid web requests with the transaction package to manage database transactions declaratively across request lifecycles.","skillfed_tags":["pyramid-integration","transaction-management","wsgi-middleware"],"use_cases":["Automatically commit database changes at the end of a successful HTTP request without explicit transaction calls in view code.","Abort database transactions when an exception occurs, rolling back partial changes and returning an error response.","Track which user performed a transaction by annotating the transaction log with authenticated user identity.","Implement custom commit/abort logic via commit_veto hooks to decide whether to persist changes based on response status or headers.","Coordinate multi-step database operations across a single request lifecycle with automatic rollback on failure."],"what_it_does":"pyramid_tm is a Pyramid web framework extension that automatically binds each HTTP request to a transaction managed by the transaction package. When you include it in your Pyramid application, every request gets its own transaction context that commits on success or aborts on exception, eliminating manual transaction boilerplate in request handlers.\n\nThe package runs as a Pyramid tween (middleware layer) positioned to wrap exception views, meaning the transaction remains active even when handling errors. It supports customization through hooks like commit_veto to override commit/abort decisions, and tm.annotate_user to track authenticated users in transaction logs. It integrates with pyramid_retry for automatic transaction retry on transient errors.","worth_installing":"Yes. pyramid_tm is a mature, actively maintained package (last release November 2024) with no known vulnerabilities, low install friction, and a permissive license. It solves a common problem in Pyramid applications\u2014declarative transaction management per request\u2014cleanly and with minimal configuration. Install it if you are building a Pyramid web application that uses a database."},"id":"pyramid-tm","links":{"html":"https://skillfed.io/packages/pyramid-tm","md":"https://skillfed.io/packages/pyramid-tm.md","pypi":"https://pypi.org/project/pyramid-tm/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-11-14","license_spdx":null,"license_treatment":"permissive","name":"pyramid-tm","python_support":"supports_current","summary":"A package which allows Pyramid requests to join the active transaction"},"popularity":{"monthly_downloads":437936,"position":6662,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.6"}
