### Navigation

- index
- modules |
- next |
- previous |
- repoze.tm2 2.0b1 documentation »

# `repoze.tm`

`repoze.tm.``default_commit_veto`(environ, status, headers)

  When used as a commit veto, the logic in this function will cause the transaction to be committed if:

  - An `X-Tm` header with the value `commit` exists.

  If an `X-Tm` header with the value `commit` does not exist, the transaction will be aborted, if:

  - An `X-Tm` header with the value `abort` (or any value other than `commit`) exists.
  - An `X-Tm-Abort` header exists with any value (for backwards compatibility; prefer `X-Tm=abort` in new code).
  - The status code starts with `4` or `5`.

  Otherwise the transaction will be committed by default.

class `repoze.tm.``TM`(application, commit_veto=None)

  Transaction management WSGI middleware

class `repoze.tm.``AfterEnd`

  Callback registry API helper class. Use the singleton instance `repoze.tm.after_end` when possible.

`repoze.tm.``after_end`

### Navigation

- index
- modules |
- next |
- previous |
- repoze.tm2 2.0b1 documentation »