{"id":28388,"library":"tigerbeetle","title":"TigerBeetle Python Client","description":"The official Python client for TigerBeetle, a high-performance financial accounting database. Current version 0.17.3, released irregularly alongside server updates. Requires Python >=3.7 and a running TigerBeetle server (typically started via Docker).","status":"active","version":"0.17.3","language":"python","source_language":"en","source_url":"https://github.com/tigerbeetle/tigerbeetle","tags":["tigerbeetle","financial","database","accounting","high-performance"],"install":[{"cmd":"pip install tigerbeetle","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Client is the main class, not a module-level function.","wrong":"import tigerbeetle","symbol":"Client","correct":"from tigerbeetle import Client"},{"note":"","wrong":"","symbol":"CreateAccountResult","correct":"from tigerbeetle import CreateAccountResult"}],"quickstart":{"code":"import os\nfrom tigerbeetle import Client\n\nclient = Client(\n    cluster_id=0,\n    replica_addresses=[os.environ.get('TB_ADDRESS', '3000')],\n)\n\naccount = {\n    'id': 1,\n    'debits_pending': 0,\n    'debits_posted': 0,\n    'credits_pending': 0,\n    'credits_posted': 0,\n    'user_data': 0,\n    'reserved': 0,\n    'ledger': 1,\n    'code': 1,\n    'flags': 0,\n}\ncreate_accounts_result = client.create_accounts([account])\nprint(create_accounts_result)","lang":"python","description":"Create a TigerBeetle client and create a single account."},"warnings":[{"fix":"Always upgrade both client and server together. Check release notes for compatible version pairs.","message":"Client version must be >=0.16.4 and server version must be >=0.16.78 (for 0.17.3) due to protocol incompatibility. Mismatched versions cause connection errors or data corruption.","severity":"breaking","affected_versions":"all >=0.16.0"},{"fix":"Use one client per thread or synchronize access with locks.","message":"Client is not thread-safe; creating multiple clients or sharing a single client across threads leads to undefined behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace class instances with dicts as shown in quickstart.","message":"The Account and Transfer classes from earlier versions are deprecated. Use plain dictionaries with snake_case field names.","severity":"deprecated","affected_versions":">=0.13.0"},{"fix":"Ensure account IDs fit within 128 bits. Use smaller values or hash IDs to fit.","message":"Account IDs must be 128-bit unsigned integers; using Python ints beyond 2^128-1 will overflow silently.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Start a server: `docker run -p 3000:3000 ghcr.io/tigerbeetle/tigerbeetle:0.17.3 start --addresses=0.0.0.0:3000`","cause":"TigerBeetle server is not running or not listening on the expected address.","error":"Connection refused: connect() to tcp://127.0.0.1:3000 failed"},{"fix":"Upgrade both client and server to the same release version or check supported upgrade versions in release notes.","cause":"Client and server versions do not match the required compatibility range.","error":"ValueError: The server version is incompatible with this client"},{"fix":"Upgrade to latest: `pip install --upgrade tigerbeetle`, then use `from tigerbeetle import Client`.","cause":"Using an outdated tigerbeetle package or incorrect import path.","error":"ImportError: cannot import name 'Client' from 'tigerbeetle'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}