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.

Source Distribution

WSGI-MonkeyType-1.0.3.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file WSGI-MonkeyType-1.0.3.tar.gz.

File metadata

  • Download URL: WSGI-MonkeyType-1.0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7

File hashes

Hashes for WSGI-MonkeyType-1.0.3.tar.gz
Algorithm Hash digest
SHA256 89816600cb762ddaaa0088230df884a394a35fe89835bbbc6bcc38d3d688bf65
MD5 0e3188f8dfcdad611b150b5c00eee5df
BLAKE2b-256 18471df851842a3e8a5518ef55fe9488753b0aee1f386ed5b6bfbce5d66260c8

See more details on using hashes here.

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