{"id":22364,"library":"signalfx","title":"SignalFx Python Library","description":"SignalFx Python Library provides a client for sending metrics and events to SignalFx, and for interacting with SignalFlow computations. Current version 1.1.16, released 2022-07. Maintenance mode; no active development.","status":"maintenance","version":"1.1.16","language":"python","source_language":"en","source_url":"https://github.com/signalfx/signalfx-python","tags":["metrics","monitoring","signalfx","observability","SignalFlow"],"install":[{"cmd":"pip install signalfx","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for protobuf-based ingest; pinned to <4.21.0 in 1.1.16","package":"protobuf","optional":false}],"imports":[{"note":"SignalFx class is under the signalfx package, not a top-level import.","wrong":"import signalfx","symbol":"SignalFx","correct":"from signalfx import SignalFx"},{"note":"Use SignalFx class; client classes are internal.","wrong":"from signalfx.client import SignalFxClient","symbol":"SignalFxClient","correct":"from signalfx import SignalFx"}],"quickstart":{"code":"import os\nfrom signalfx import SignalFx\n\n# Set token via environment variable\nsfx = SignalFx(api_endpoint='https://ingest.signalfx.com', ingest_timeout_seconds=5)\n# If using a realm: sfx = SignalFx(api_endpoint='https://ingest.<REALM>.signalfx.com')\nwith sfx.ingest(os.environ.get('SIGNALFX_ACCESS_TOKEN', '')) as ingest:\n    ingest.send_datapoints([\n        {\n            'metric': 'cpu.utilization',\n            'value': 42.0,\n            'dimensions': {'host': 'server1'}\n        }\n    ])\n    ingest.send_events([\n        {\n            'eventType': 'deployment',\n            'dimensions': {'host': 'server1'}\n        }\n    ])","lang":"python","description":"Send a datapoint and event using the v1 SDK with a context manager."},"warnings":[{"fix":"pip install 'signalfx>=1.1.12'","message":"Versions 1.1.7 to 1.1.11 contain serious bugs (HTTP reconnection issues, data corruption). Upgrade directly to 1.1.12 or later.","severity":"breaking","affected_versions":"1.1.7 - 1.1.11"},{"fix":"Migrate to OpenTelemetry SDK or direct ingest via signalfx.","message":"The 'pyformance' integration (SignalFxRegistry) is deprecated and removed in later versions. Use OpenTelemetry or custom metrics instead.","severity":"deprecated","affected_versions":"<=1.0.19"},{"fix":"Use separate SignalFx instances for ingest and SignalFlow with appropriate tokens.","message":"The SignalFlow API (get_computation, etc.) uses a different token (stream token) than ingest token. Must use SignalFx(stream_endpoint=...) or set SIGNALFX_ACCESS_TOKEN for ingest, but for SignalFlow you need to use the SignalFx(api_endpoint=...) with the stream token.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure metric value is numeric: {'metric': 'cpu', 'value': float(cpu_percent)}","cause":"Sending invalid metric value type (e.g., string, list). Values must be int or float.","error":"ValueError: Unknown type for value: ..."},{"fix":"Set SIGNALFX_ACCESS_TOKEN environment variable or pass token to SignalFx().","cause":"Invalid or missing access token.","error":"signalfx.exceptions.SignalFxException: 401 Unauthorized"},{"fix":"pip install --upgrade signalfx. On Python 2.7, use signalfx <=1.0.19.","cause":"Old Python version missing the module or corrupted install.","error":"ImportError: cannot import name 'SignalFx' from 'signalfx' (unknown location)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}