Skip to main content

StatHat extension for Flask

Project description

http://i.imgur.com/YuqGF.png

Flask-StatHat

http://img.shields.io/pypi/v/Flask-StatHat.png

StatHat extension for Flask

Install

python
pip install Flask-StatHat

Setup

from flask_stathat import StatHat
stathat = StatHat()
stathat.init_app(app)  # or stathat = StatHat(app)

Usage

@app.route('/')
def index():
    stathat.count('some_stat', 1)
    stathat.value('some_value', 9001)
    # The stathat requests won't be sent until the flask request
    # has been processed and no exceptions were raised
    ...

Configuration

app.config.update(STATHAT_EZ_KEY='STAHAT_EZ_KEY')

Async

Flask-StatHat will use grequests if it’s installed

License

http://marksteve.mit-license.org

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

Flask-StatHat-0.1.2.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file Flask-StatHat-0.1.2.tar.gz.

File metadata

File hashes

Hashes for Flask-StatHat-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1d143f52816676c46edb98d8976d83e5e4e39c068a9c190222ab41bfe8a0603b
MD5 dc72b3338ea6f39588ffdf92f183b141
BLAKE2b-256 35c969bc1ebbe3fc86eab842a50f2d121b40143bae795c96a41f0777715d77c6

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