--- id: statsd version: "4.0.1" license: MIT license_treatment: permissive maintenance: active --- # statsd — A simple statsd client. License: permissive · Maintenance: active · Downloads: 18.0M/mo ## What it is and what it does statsd is a lightweight Python client for sending application metrics to a statsd daemon, which typically forwards them to Graphite for storage and visualization. It provides a simple API to increment counters, record timings, and report gauges—the core metric types used in monitoring systems. The library has no runtime dependencies and works across Python 3.7 through 3.11, making it easy to add to existing projects. You instantiate a StatsClient with a host and port, then call methods like incr(), timing(), and gauge() to emit metrics. The client handles the UDP protocol communication with the daemon. It supports metric prefixing to namespace your stats, and the straightforward API makes it suitable for both simple scripts and large applications that need to feed metrics into a centralized monitoring stack. Use it for: - Track request counts and response times in a web application for real-time performance dashboards. - Monitor background job execution by recording job duration and success/failure counters. - Measure database query performance by timing queries and reporting slow-query counts. - Instrument microservices to emit custom business metrics (e.g., user signups, transactions) to a shared monitoring backend. - Profile batch processing jobs by recording throughput and latency metrics during data pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library that sends metrics to a statsd daemon, enabling you to track counters, timers, and gauges for monitoring and visualization in Graphite. Yes. statsd is a mature, zero-dependency client for a widely-used monitoring protocol. It has no known vulnerabilities, permissive licensing, and active maintenance. Install it if you need to send metrics to a statsd/Graphite stack; skip it only if your monitoring backend uses a different protocol (Prometheus, CloudWatch, etc.). ## Install pip install statsd uv add statsd poetry add statsd ## Installing statsd Before you install: Low friction: pure Python wheel with no runtime dependencies. Maintenance is active with recent commits; the package has been stable since its early releases. License in practice: MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution. Quickstart: pip install statsd import statsd c = statsd.StatsClient('localhost', 8125) c.incr('foo') # Increment counter c.timing('stats.timed', 320) # Record 320ms timing A statsd daemon must be running and reachable at the specified host and port (default localhost:8125). Verify before relying: - Whether the package supports UDP batching or other performance optimizations for high-volume metric submission. - Current test coverage and CI/CD practices given the long gap since the latest release (2022-11-06). ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 18.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags statsd client python, metrics collection graphite, counter timer gauge monitoring, statsd daemon integration, application metrics tracking, performance monitoring client, real-time metrics reporting, metrics, monitoring, graphite [View on SkillFed](https://skillfed.io/packages/statsd) · [View on PyPI](https://pypi.org/project/statsd/)