Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

auditable tracing for linking requests between services

Project Description

# Petitioners

[![Build Status](]( [![Latest Version](]( [![Downloads](]( [![Supported Python versions](]( [![License](](

Adds tracing to requests generated by Flask apps.

@petitioners.register_flask_app('X-Request-Trace', 'Trace-')
class FlaskApp(flask.Flask):

app = FlaskApp('name')

# or if you prefer not to use a decorator

Requests to `app` will now generate response with headers tagged like

X-Request-Trace: Trace-123123

If this header already exists then it will be appended to like

X-Request-Trace: Trace-123123,Trace-123432

The current trace value can be accessed from `app` via the `petitioners` property

>>> import flask
>>> import petitioners
>>> app = flask.Flask('name')
>>> petitioners.Petitioner.register(app)
>>> app.test_request_context().push()
>>> print flask.current_app.petitioners
<Petitioner (<Flask 'name'>)X-Petitioners=[u'OHM-c92bffaf1b27497aad73a1cb02b22059']>

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.5 kB) Copy SHA256 Hash SHA256
Source None Feb 27, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate