{"id":24832,"library":"whisper","title":"whisper","description":"Whisper is a fixed-size round-robin database library for storing time-series data, originally part of Graphite. The current version is 1.1.10, with irregular releases tied to the Graphite project. It provides a simple, file-based storage format for numeric data at fixed intervals.","status":"active","version":"1.1.10","language":"python","source_language":"en","source_url":"https://github.com/graphite-project/whisper","tags":["time-series","database","graphite","round-robin"],"install":[{"cmd":"pip install whisper","lang":"bash","label":"Latest PyPI"}],"dependencies":[],"imports":[{"note":"Whisper does not have submodules; all symbols are directly in the `whisper` package.","wrong":"from whisper.whisper import WhisperDB","symbol":"WhisperDB","correct":"from whisper import WhisperDB"},{"note":"No common wrong import for 'create'.","symbol":"create","correct":"from whisper import create"},{"note":"No common wrong import for 'update'.","symbol":"update","correct":"from whisper import update"}],"quickstart":{"code":"from whisper import create, update, fetch\nimport time\n\n# Create a whisper database with 1 hour of 1-minute archives\npath = '/tmp/test.wsp'\ncreate(path, [(1, 60)])  # 1 second precision, 60 points\n\n# Update with a value\nnow = int(time.time())\nupdate(path, now, 42.0)\n\n# Fetch data\n(fetch_info, data) = fetch(path, now - 60, now)\nprint(data)","lang":"python","description":"Creates a new whisper database, updates it with a data point, and fetches the data."},"warnings":[{"fix":"Plan archive sizes carefully to avoid losing data unexpectedly.","message":"Whisper uses fixed-size archives. If you specify too few retention points, old data is silently overwritten (round-robin behavior). There is no warning.","severity":"gotcha","affected_versions":"all"},{"fix":"Always convert to int: `int(time.time())`.","message":"Timestamps must be integers (Unix timestamps). Passing a float or datetime object will raise a TypeError or produce incorrect results.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Python API (e.g., `from whisper import ...`) instead of shelling out.","message":"The `whisper.py` script (command-line tool) is not actively maintained and may have bugs. Use programmatic API instead.","severity":"deprecated","affected_versions":"1.1.x"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you have whisper>=1.0.0 installed (`pip install --upgrade whisper`) and use `from whisper import WhisperDB`.","cause":"The symbol `WhisperDB` may not exist in older versions (pre-1.0) or if installed via the wrong package.","error":"ImportError: cannot import name 'WhisperDB' from 'whisper'"},{"fix":"Cast to int: `int(your_timestamp)`.","cause":"Passing a floating-point timestamp instead of an integer.","error":"TypeError: an integer is required (got type float)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}