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.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: Flask-StatHat-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Flask-StatHat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bb5976358c06529262045ee4b14c322b748490290a96b783b9202042bd7cb8ac
MD5 bec0e1e65cd4019b6b7415c42416e066
BLAKE2b-256 5f2e279155851c73a71e5bd3b3a062c15bef871a67a460b2cf88905b8924f6b7

See more details on using hashes here.

Supported by

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