Skip to main content

some monkeytype utils for wsgi application

Project description

WSGI-MonkeyType

Some MonkeyType utils for wsgi application. Include:

  • wsgi middleware
  • monkeytype mysql store
  • flask extension

Installation

install wsgi-monkeytype

pip install wsgi-monkeytype

install wsgi-monkeytype with mysql store

pip install wsgi-monkeytype[mysql]

install wsgi-monkeytype with flask integration

pip install wsgi-monkeytype[flask]

Usage

wsgi middleware

from wsgi_monkeytype import MonkeyTypeWsgiMiddleware
from monkeytype.config import DefaultConfig
config = DefaultConfig()

wsgi_app = ...
wsgi_app = MonkeyTypeWsgiMiddleware(wsgi_app, config)

flask extension

from flask import Flask
from wsgi_monkeytype.flask import MonkeyType
from monkeytype.config import DefaultConfig


# use sqlite store
config = DefaultConfig()

app = Flask()
MonkeyType(config).init_app(app)

monkeytype mysql store

from wsgi_monkeytype.mysql_store import MysqlStoreMonkeyTypeConfig
config = MysqlStoreMonkeyTypeConfig("mysql://user:password@host:port/db", sample_rate=1)

License

BSD

Project details


Download files

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

Files for WSGI-MonkeyType, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size WSGI-MonkeyType-1.0.3.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page