This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Flask-Whiteprint is an enhancement of Flask-Blueprint.


Flask-Whiteprint is on development. I recommend NOT using it now.

Whiteprint-level Error Handler

Flask-Whiteprint supports whiteprint-level error handler for all exceptions include 404 and 500. I’ll remove that ending parentheses soon.

def handle_error(e):
    data = {
        'error': {
            'code': e.code,
            'message': e.message
    return Response(data, mimetype='application/json', status=e.status)

Dynamic Alias URL

You can alias url with alias method. Alias redirects without any redirect response (e.g. 301 or 302) and with all request context (e.g. HTTP Header, URL Variables or Form Data). This code redirects /me to /user/<int:id> with all request context.

@api.route('/me', methods=['GET', 'POST', 'PUT', 'DELETE'])
@api.route('/me/<path:path>', methods=['GET', 'POST', 'PUT', 'DELETE'])
def redirect_me(path=''):
    if 'path' in request.view_args:
    user_path = '/user/%d/' % + path
    if user_path[-1] == '/':
        user_path = user_path[:-1]
    return api.alias(user_path,

Sub whiteprint (Not yet)

You can add child whiteprints to another whiteprint.

app (Flask Application)
|-- api (Parent whiteprint)
|   |-- auth (Child whiteprint)
|   |   |-- login (Another child whiteprint)
|   |   `-- logout
|   |-- user
|   `-- post
|-- web (Another parent whiteprint)
|   |-- auth
|   |-- user
|   `-- post
`-- admin
    `-- admin

It looks awkward, but… just for an example!

Release History

Release History


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

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Flask-Whiteprint-0.0.1.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source Dec 4, 2013

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