# Flask-StatsClient
[](https://travis-ci.org/bbelyeu/flask-statsdclient) [](https://coveralls.io/github/bbelyeu/flask-statsdclient?branch=master)
## Requirements
This project requires Python 3.5+ and Flask 0.12. Test builds in Travis CI test 3.5 & 3.6.
## Installation
To install it, simply run
pip install flask-statsdclient
If you’re using Datadog(https://www.datadoghq.com/) for your metric collection, you can enable the additional functionality of dogstatsd(http://datadogpy.readthedocs.io/en/latest/#datadog-dogstatsd-module) by installing it via
pip install flask-statsdclient[Datadog]
## Usage
Import it and wrap app
from flask import Flask from flask_statsdclient import StatsDClient
app = Flask(__name__) statsd = StatsDClient(app)
You may modify the host, port and prefix with STATSD_HOST, STATSD_PORT and STATSD_PREFIX options respectively in your Flask app config.
If you are using Datadog with a Unix socket, instead of specifying the host & port in config, add DD_SOCKET which is a fully qualified Unix path to the socket.
## Development
On a mac you can use the following commands to get up and running. ` bash brew install python3 ` otherwise run ` bash brew upgrade python3 ` to make sure you have an up to date version.
This project uses [pip-tools](https://pypi.org/project/pip-tools/) for dependency management. Install pip-tools
` bash pip3 install pip-tools `
setup the project env ` base python -m venv venv pip install -r requirements.txt -r requirements-dev.txt `
Make sure the following environment variables are set ` bash export PYTHONPATH=`pwd` `
Then load your virtualenv `bash source venv/bin/activate `
### Running tests
` bash ./linters.sh && coverage run --source=flask_statsdclient/ setup.py test `
### Before committing any code
We have a pre-commit hook each dev needs to setup. You can symlink it to run before each commit by changing directory to the repo and running
` bash cd .git/hooks ln -s ../../pre-commit pre-commit `
Metadata
Release files for Flask-StatsDClient 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Flask-StatsDClient-2.1.1.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_StatsDClient-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / Flask-StatsDClient-2.1.1.tar.gz
| Download URL | Flask-StatsDClient-2.1.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
401436b1a56701975d21fe4aa1aaf2db3630da3ba78291bd81e6e9cbfcad2a48
|
|
BLAKE2b-256 checksum How to use checksums |
4197643bef253492b6dbe61add704684fa3386f40245af27b226d449868c9177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.5.7
|
Release files / Flask_StatsDClient-2.1.1-py3-none-any.whl
| Download URL | Flask_StatsDClient-2.1.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00f992df089622a50110dc713d29089652e7055a2a17c884249d3943f52403da
|
|
BLAKE2b-256 checksum How to use checksums |
1c9153ba4139667e7142c3899f1eb8a0bb21e1e43ef1da2996b7b1dde800c004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.5.7
|
Security for Flask-StatsDClient 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.