{"id":24635,"library":"splitwise","title":"Splitwise Python SDK","description":"Unofficial Python SDK for the Splitwise API. Version 3.0.0 includes fixes for updateExpense and getExpenses. Release cadence is irregular.","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/namaggarwal/splitwise","tags":["splitwise","api","sdk","expense-sharing"],"install":[{"cmd":"pip install splitwise","lang":"bash","label":"Stable"}],"dependencies":[],"imports":[{"note":"splitwise is a module; the class is Splitwise.","wrong":"import splitwise","symbol":"Splitwise","correct":"from splitwise import Splitwise"},{"note":null,"wrong":null,"symbol":"Expense","correct":"from splitwise.expense import Expense"}],"quickstart":{"code":"from splitwise import Splitwise\n\nsplt = Splitwise(consumer_key='YOUR_KEY', consumer_secret='YOUR_SECRET')\n# For OAuth2, use access token\n# splt = Splitwise(consumer_key='YOUR_KEY', consumer_secret='YOUR_SECRET', access_token='ACCESS_TOKEN')\nprint(splt.getCurrentUser())","lang":"python","description":"Initialize the SDK and fetch the current user."},"warnings":[{"fix":"Update code to match new constructor signature. For OAuth1, use setAccessToken() after authorization.","message":"In v2.0.0, OAuth2 support was added. The constructor signature changed: OAuth1 uses consumer_key/consumer_secret, OAuth2 also requires access_token.","severity":"breaking","affected_versions":"<2.0.0 -> >=2.0.0"},{"fix":"Review expense update and expense listing logic after upgrading.","message":"In v3.0.0, updateExpense() and getExpenses() were fixed. Behavior may have changed from v2.x.","severity":"breaking","affected_versions":"2.x -> 3.0.0"},{"fix":"Implement token refresh logic yourself by catching authorization errors and re-authorizing.","message":"The SDK does not support Splitwise OAuth2 token refresh automatically. If your access token expires, you must re-authorize.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from splitwise import Splitwise","cause":"Using import splitwise instead of from splitwise import Splitwise.","error":"ImportError: cannot import name 'splitwise'"},{"fix":"Ensure you are using the correct consumer key and secret from your Splitwise app settings.","cause":"Consumer key/secret are incorrect or swapped with API key.","error":"splitwise.SplitwiseException: Invalid consumer key or consumer secret"},{"fix":"Upgrade to splitwise>=3.0.0: pip install --upgrade splitwise","cause":"Using an older version (<3.0.0) where getExpenses was broken or not available.","error":"AttributeError: 'Splitwise' object has no attribute 'getExpenses'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}