Skip to main content

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

Project description

# markii

MarkII is an improved development-mode error handler for Python web
applications. Currently the only supported framework is `webapp2`.

## Installation

`$ pip install markii`

## Usage

```python
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](/example/screenshot.png)

## Warning

Make sure you only use MarkII in development mode.

## Gotchas

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

## Acknowledgements

MarkII borrows its ideas (and most of its look) from [better_errors](https://github.com/charliesome/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.2.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

markii-0.2.1.macosx-10.10-intel.exe (69.3 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for markii-0.2.1.tar.gz
Algorithm Hash digest
SHA256 24d965d197a286c1033c507f0e4f891a75b17122dfb524e63963e86f36b4d081
MD5 973d0e7f28047e900e7125b239380013
BLAKE2b-256 774d727958968e69f0c414924a215cab700a7a5fe151d671a0dc8edebba3c29d

See more details on using hashes here.

Provenance

File details

Details for the file markii-0.2.1.macosx-10.10-intel.exe.

File metadata

File hashes

Hashes for markii-0.2.1.macosx-10.10-intel.exe
Algorithm Hash digest
SHA256 44747427eccd5c8bb75c44a4b458d53f6598070fb664779a847425b2300cd47f
MD5 3238b3c21870a14d909dc82e6ef6ec50
BLAKE2b-256 5938e8953328fdb17c0e544e2c8df0688b717f2c05e70a2af52099fe5eb5a064

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