StatsHouse client library for Python
Project description
statshouse
StatsHouse client library for Python. Requires Python 3.7+.
Installation
$ python -m pip install statshouse
Usage
import statshouse
statshouse.value("processing_time", {"subsystem": "foo", "protocol": "bar"}, 0.239) # using named tags
statshouse.value("processing_time", ["foo", "bar"], 0.239) # same, assuming `subsystem` and `protocol` are tags #1 and #2
statshouse
exposes top-level functions which work with a local StatsHouse agent.
Address of the agent is configured with --statshouse-addr
command-line flag
or STATSHOUSE_ADDR
environment variable, and defaults to 127.0.0.1:13337
.
Additionally, --statshouse-env
command-line flag or STATSHOUSE_ENV
environment
variable can be used to specify the env
tag value for all metrics (empty by default).
Development
Install PDM, then:
$ pdm sync
$ pdm run fmt
$ pdm run lint
$ pdm run test
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
statshouse-0.2.2.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for statshouse-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87cf0cbdca7aeb37aed6465c518008087c4c821f8ab2e6f00b89e1a3d5bf333f |
|
MD5 | ec10801c7a4cb0efaa48c4b0d0e4450a |
|
BLAKE2b-256 | ced3bea06eaf98843ad5c888d2a56d282c968bb964a990d1ea2bb74ac2c65512 |