{"id":21397,"library":"graphyte","title":"Graphyte","description":"A simple Python 3 compatible library to send metrics to a Graphite Carbon server (plaintext or pickle protocol, TCP or UDP). Current version: 1.7.1. Low release cadence (last update 2020).","status":"maintenance","version":"1.7.1","language":"python","source_language":"en","source_url":"https://github.com/benhoyt/graphyte","tags":["graphite","metrics","monitoring","carbon","plaintext","udp","tcp"],"install":[{"cmd":"pip install graphyte","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"","wrong":null,"symbol":"init","correct":"from graphyte import init"},{"note":"","wrong":null,"symbol":"Sender","correct":"from graphyte import Sender"}],"quickstart":{"code":"import os\nfrom graphyte import init, send\n\n# Initialize with default sender (uses GRAPHITE_HOST env var or 'localhost')\ninit(\n    host=os.environ.get('GRAPHITE_HOST', 'localhost'),\n    port=int(os.environ.get('GRAPHITE_PORT', 2003)),\n    prefix=os.environ.get('GRAPHITE_PREFIX', 'test')\n)\n\n# Send a metric\nsend('cpu.load', 0.5, timestamp=1234567890)","lang":"python","description":"Initialize a default sender and send a metric. Uses environment variables for configuration."},"warnings":[{"fix":"Use Python 3.6+.","message":"Python 2 is not supported. Graphyte requires Python 3. Using it with Python 2 will fail.","severity":"breaking","affected_versions":">=1.0"},{"fix":"For UDP metrics: init('localhost', protocol='udp') or Sender('localhost', protocol='udp').","message":"The default protocol is TCP. To use UDP, you must pass protocol='udp' when initializing the sender.","severity":"gotcha","affected_versions":">=1.1"},{"fix":"Ensure tag keys and values do not contain spaces. Use underscores or other separators.","message":"Tags with whitespace in keys or values will be rejected (since v1.6.0). Metric paths with spaces may also cause issues.","severity":"gotcha","affected_versions":">=1.6.0"},{"fix":"Use 'from graphyte import init'.","message":"The old import path 'graphyte.init' is still supported but using 'from graphyte import init' is preferred.","severity":"deprecated","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.7.1':25 '2020':31 '3':5 'cadenc':28 'carbon':14,35 'compat':6 'current':23 'graphit':13,32 'graphyt':1 'last':29 'librari':7 'low':26 'metric':10,33 'monitor':34 'pickl':18 'plaintext':16,36 'protocol':19 'python':4 'releas':27 'send':9 'server':15 'simpl':3 'tcp':20,38 'udp':22,37 'updat':30 'version':24","created_at":"2026-04-27T16:59:41.313905+00:00","updated_at":"2026-04-27T16:59:41.313905+00:00","problems":[{"fix":"Run 'pip install graphyte' and verify you're using Python 3.","cause":"Package not installed or installed for wrong Python version.","error":"ModuleNotFoundError: No module named 'graphyte'"},{"fix":"Use 'from graphyte import init' instead.","cause":"Common mistake: import graphyte; graphyte.init() but init is not a top-level attribute of the package.","error":"AttributeError: module 'graphyte' has no attribute 'init'"},{"fix":"Remove illegal characters from metric name. For example, 'test.load' is fine, but 'test load' is not.","cause":"Metric names must match Graphite's allowed characters (alphanumeric, underscores, hyphens, dots).","error":"graphyte.exceptions.InvalidMetric: name 'test.load' contains non-graphite-compatible characters"},{"fix":"Verify Carbon is running: check host/port, ensure firewall allows traffic, test with 'nc -v <host> <port>'.","cause":"Graphite Carbon server is not running on the specified host/port or network issues.","error":"Connection refused or timeout when sending metrics"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.7.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/benhoyt/graphyte","docs":null,"changelog":null,"pypi":"https://pypi.org/project/graphyte/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["observability","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}