This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description
# Petitioners

[![Build Status](https://secure.travis-ci.org/balanced/petitioners.png?branch=master)](http://travis-ci.org/balanced/petitioners) [![Latest Version](https://pypip.in/version/petitioners/badge.svg)](https://pypi.python.org/pypi/petitioners/) [![Downloads](https://pypip.in/download/petitioners/badge.svg)](https://pypi.python.org/pypi/petitioners/) [![Supported Python versions](https://pypip.in/py_versions/petitioners/badge.svg)](https://pypi.python.org/pypi/petitioners/) [![License](https://pypip.in/license/petitioners/badge.svg)](https://pypi.python.org/pypi/petitioners/)

Adds tracing to requests generated by Flask apps.

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

app = FlaskApp('name')

# or if you prefer not to use a decorator
petitioners.Petitioner.register(app)
```

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

```python
>>> 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

Release History

0.0.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
petitioners-0.0.7.tar.gz (3.5 kB) Copy SHA256 Checksum SHA256 Source Feb 27, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting