Skip to main content

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

statshouse-0.2.4-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file statshouse-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: statshouse-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for statshouse-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4504b8cecdadbcdc3b295c2d691248c026ce63b9268e85efe1ee57c6c916e6a7
MD5 7e4d8fca370cd9d63f4b966cc4497c63
BLAKE2b-256 d9fe18e524f86f69fc230d19bb6b131b3a5484772b08ad236119dd239c53ecd0

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