Skip to main content

MarkII is a development-mode error handler for Python web applications.

Project description

MarkII is a development-mode error handler for Python web applications.

Build Status

Installation

pip install markii

Usage

import webapp2

from functools import partial
from markii.frameworks.webapp2 import handle_error
from paste import httpserver


class Handler(webapp2.RequestHandler):
    def get(self, n):
        self.response.write(str(int(n)))


app = webapp2.WSGIApplication([
    webapp2.Route(r"/<n:.*>", handler=Handler)
], debug=True)
app.error_handlers[400] = partial(handle_error, code=400)
app.error_handlers[404] = partial(handle_error, code=404)
app.error_handlers[500] = partial(handle_error, code=500)
httpserver.serve(app, host="127.0.0.1", port="8080")

Screenshot

Screenshot

Screenshot

Warning

Make sure you only use MarkII in development mode.

Gotchas

On AppEngine, you must call markii.appengine.fix_appengine() inside your error handler.

Text editor support

MarkII supports opening files in your editor when you double click a frame by taking advantage of OSX’s URL handler feature. See:

Acknowledgements

MarkII borrows its ideas (and most of its look) from better_errors.

Project details


Download files

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

Source Distribution

markii-0.3.1.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file markii-0.3.1.tar.gz.

File metadata

  • Download URL: markii-0.3.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for markii-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b441b285b2f3029de4a728f00d6f335da4baf2e11f09a148daef80322aa6be9b
MD5 4bf9f73da8082bf0093d2925a19ac6fd
BLAKE2b-256 671b9f96d3ae83ea877e8392d1d9b884c79c649a84efe795bbbaa2b9efb013b7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page