{"id":13595370,"url":"https://github.com/namaggarwal/splitwise","last_synced_at":"2026-01-23T00:36:05.900Z","repository":{"id":38815302,"uuid":"64525535","full_name":"namaggarwal/splitwise","owner":"namaggarwal","description":"Python SDK for Splitwise","archived":false,"fork":false,"pushed_at":"2024-05-21T05:50:43.000Z","size":524,"stargazers_count":196,"open_issues_count":4,"forks_count":50,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-05T07:30:20.644Z","etag":null,"topics":["expenses","python-sdk","splitwise","splitwise-sdk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/namaggarwal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.me/namanagg"]}},"created_at":"2016-07-30T04:09:47.000Z","updated_at":"2025-10-04T14:11:50.000Z","dependencies_parsed_at":"2024-01-16T22:18:31.071Z","dependency_job_id":"0777fc75-841b-4c42-9211-6d158036fa26","html_url":"https://github.com/namaggarwal/splitwise","commit_stats":{"total_commits":115,"total_committers":11,"mean_commits":"10.454545454545455","dds":0.6086956521739131,"last_synced_commit":"b81ceedf173d56c546f1ecf84cf721c78a99f6a5"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/namaggarwal/splitwise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namaggarwal%2Fsplitwise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namaggarwal%2Fsplitwise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namaggarwal%2Fsplitwise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namaggarwal%2Fsplitwise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namaggarwal","download_url":"https://codeload.github.com/namaggarwal/splitwise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namaggarwal%2Fsplitwise/sbom","scorecard":{"id":673483,"data":{"date":"2025-08-11","repo":{"name":"github.com/namaggarwal/splitwise","commit":"50cd06077f657c53f4f216fa27df9c83a6265eeb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/end_to_end_test.yaml:1","Warn: no topLevel permission defined: .github/workflows/lint_and_test.yaml:1","Warn: no topLevel permission defined: .github/workflows/pre-release.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/end_to_end_test.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/end_to_end_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/end_to_end_test.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/end_to_end_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_and_test.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/lint_and_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_and_test.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/lint_and_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pre-release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/pre-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pre-release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/pre-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pre-release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/pre-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pre-release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/pre-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pre-release.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/pre-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/namaggarwal/splitwise/release.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/end_to_end_test.yaml:23","Warn: pipCommand not pinned by hash: .github/workflows/end_to_end_test.yaml:24","Warn: pipCommand not pinned by hash: .github/workflows/end_to_end_test.yaml:25","Warn: pipCommand not pinned by hash: .github/workflows/end_to_end_test.yaml:28","Warn: pipCommand not pinned by hash: .github/workflows/lint_and_test.yaml:20","Warn: pipCommand not pinned by hash: .github/workflows/lint_and_test.yaml:21","Warn: pipCommand not pinned by hash: .github/workflows/lint_and_test.yaml:22","Warn: pipCommand not pinned by hash: .github/workflows/pre-release.yml:37","Warn: pipCommand not pinned by hash: .github/workflows/pre-release.yml:38","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:36","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:37","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of  11 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T20:53:20.239Z","repository_id":38815302,"created_at":"2025-08-21T20:53:20.239Z","updated_at":"2025-08-21T20:53:20.239Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28676145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T20:48:19.482Z","status":"ssl_error","status_checked_at":"2026-01-22T20:48:14.968Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expenses","python-sdk","splitwise","splitwise-sdk"],"created_at":"2024-08-01T16:01:48.783Z","updated_at":"2026-01-23T00:36:05.879Z","avatar_url":"https://github.com/namaggarwal.png","language":"Python","readme":"# Splitwise Python SDK\n\n![](https://pepy.tech/badge/splitwise)\n![](https://img.shields.io/pypi/l/splitwise.svg)\n![](https://img.shields.io/pypi/wheel/splitwise.svg)\n![](https://img.shields.io/pypi/pyversions/splitwise.svg)\n\nThis is the python sdk for Splitwise APIs. Pull requests and bug reports are welcomed.\n\n## Latest Version\n\nThe latest version of splitwise SDK is Splitwise-3.0.0\n\n## Docs\n\nThe detailed docs are hosted at [readthedocs.org](https://readthedocs.org/projects/splitwise/)\n\n## Installation\n\nInstall using pip :\n```sh\n$ pip install splitwise\n```\n## Register your application\n\nRegister your application on [splitwise](https://secure.splitwise.com/oauth_clients) and get your consumer key and consumer secret.\n\n## Include splitwise in your application\n```python\nfrom splitwise import Splitwise\n```\n\n## Get splitwise instance\n\nTo get an instance to splitwise just provide the consumer key and secret.\n\n\n```python\nsObj = Splitwise(\"\u003cconsumer key\u003e\",\"\u003cconsumer secret\u003e\")\n```\n\n## Debug\n\nTo get the debug logs use\n\n```python\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n```\n\n## Usage\n\n### Authorize splitwise\n\nBefore you can make call to splitwise, you need to get access token of the user on whose behalf you will be making call. Think of it as login with splitwise. Its based on OAuth and its a 2 step process.\n\n\n#### OAuth1\n\n1. Get the Authorize URL and Secret. Redirect the user to the Authorize url and store the secret in somewhere for eg in session.\n\n    ```python\n    sObj = Splitwise(\"\u003cconsumer key\u003e\",\"\u003cconsumer secret\u003e\")\n    url, secret = sObj.getAuthorizeURL()\n    #Store secret so you can retrieve it later\n    #redirect user to url\n    ```\n\n2. After authorization splitwise will redirect the user back to the callback url that you provided during registration. It will also provide oauth_token and oauth_verifier that can be used along with secret from step 1 to get access token. The below snippet is from Flask application to extract parameters and then using SDK to get access token. This access token can be stored in your db to make calls on his/her behalf.\n\n    ```python\n    oauth_token    = request.args.get('oauth_token')\n    oauth_verifier = request.args.get('oauth_verifier')\n\n    sObj = Splitwise(Config.consumer_key,Config.consumer_secret)\n    access_token = sObj.getAccessToken(oauth_token,session['secret'],oauth_verifier)\n\n    session['access_token'] = access_token\n    ```\n\n#### OAuth2\n\nIt is now possible to use OAuth2 with Splitwise. For details you can refer to [readthedocs.org](https://readthedocs.org/projects/splitwise/)\n\n#### API Key\n\nYou can use API Key provided by Splitwise to test APIs for your user.\n\n```python\nsObj = Splitwise(\"\u003cconsumer key\u003e\",\"\u003cconsumer secret\u003e\",api_key=\"\u003capi key\u003e\")\ncurrent = sObj.getCurrentUser()\n```\n\n### Get data from splitwise\n\nOnce you have the access token you can make the calls to splitwise. Get the splitwise instance and set the access token and then make authorized calls.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getFriends()\n```\n\n### Get Current User\n\nYou can use ```getCurrentUser()``` to get the current user. It returns a ```CurrentUser``` object.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getCurrentUser()\n```\n\n### Get User\n\nYou can use ```getUser(id)``` to get the user. It returns a ```User``` object.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nid = 7123\nuser = sObj.getUser(id)\n```\n\n### Update User\n\nYou can use ```updateUser(user)``` to update the user. It takes in a  partial `CurrentUser` object\nwith atleast `id` set. It returns a ```CurrentUser``` object.\nNote that you can update anything for your user and `first_name`, `last_name` and `email` for\nany acquaintances who has not created account yet.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nuser = User()\nuser.setId(10)\nuser.setFirstName(\"naman\")\nupdated_user, error = sObj.updateUser(user)\nprint(updated_user.getFirstName())\n```\n\n### Get Friends\n\nYou can use ```getFriends()``` to get all the friends of the current user along with the balances. It returns a list of ```Friend``` objects.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getFriends()\n```\n\n### Get Groups\n\nYou can use ```getGroups()``` to get all the groups of the current user along with the members and balances. It returns a list of ```Group``` objects.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getGroups()\n```\n\n### Get Currencies\n\nYou can use ```getCurrencies()``` to get all the currencies supported by splitwise. It returns a list of ```Currency``` objects.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getCurrencies()\n```\n\n### Get Category\n\n\nYou can use ```getCategories()``` to get all the categories and sub categories provided by splitwise. It returns a list of ```Category``` objects.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getCategories()\n```\n\n### Get Group\n\nYou can use ```getGroup(id)``` to get the particular group of the current user along with the members and balances. It returns a ```Group``` object. Use id as 0 to get all non group expenses.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getGroup(43233)\n```\n\n### Get Expenses\n\nYou can use ```getExpenses(offset,limit,group_id,friend_id,dated_after,dated_before,updated_after,updated_before,visible)``` to get all the expenses of the current user based on filter options. It returns a list of ```Expense``` objects.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getExpenses()\n```\n\n### Get Expense\n\nYou can use ```getExpense(id)``` to get the particular expense of the current user. It returns a ```Expense``` object.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nsObj.getExpense(43233)\n```\n\n### Create Expense\n\nYou can use ```createExpense(Expense)``` to create a new Expense. It takes in parameter a partial ```Expense``` object and returns an ```Expense``` object.\n\nFollowing things need to be set on the ```Expense``` object.\n\n1. Cost\n2. Description\n3. Users - Should be a list of ```ExpenseUser``` with id and paidShare and owedShare set.\n\n```python\nfrom splitwise.expense import Expense\nfrom splitwise.user import ExpenseUser\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nexpense = Expense()\nexpense.setCost('10')\nexpense.setDescription(\"Testing\")\nexpense.setReceipt(\"/Users/naman/receipt.jpg\")\n\nuser1 = ExpenseUser()\nuser1.setId(79774)\nuser1.setPaidShare('10.00')\nuser1.setOwedShare('2.0')\n\nuser2 = ExpenseUser()\nuser2.setId(281236)\nuser2.setPaidShare('0.00')\nuser2.setOwedShare('8.00')\n\nusers = []\nusers.append(user1)\nusers.append(user2)\n\nexpense.setUsers(users)\n\nexpense, errors = sObj.createExpense(expense)\nprint expense.getId()\n```\n\n### Create Group\n\nYou can use ```createGroup(Group)``` to create a new Group. It takes in parameter a partial ```Group``` object and returns an ```Group``` object.\n\nFollowing things need to be set on the ```Group``` object.\n\n1. Name\n2. Users - Should be a list of ```User``` with either FirstName, LastName and Email or just Id set.\n\n```python\nfrom splitwise.group import Group\nfrom splitwise.user import User\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\ngroup = Group()\ngroup.setName(\"Testing\")\n\nuser1 = User()\nuser1.setId(79774)\n\nuser2 = User()\nuser2.setId(281236)\n\nusers = []\nusers.append(user1)\nusers.append(user2)\n\ngroup.setMembers(users)\n\ngroup, errors = sObj.createGroup(group)\nprint group.getId()\n```\n\n### Add user to group\nYou can use ```addUserToGroup(User, group_id)``` to add user to group. It takes in a `splitwise.user.User`\nobject that has either `id` or `firstName` and `email` set and a `group_id`.\n\n```python\nfrom splitwise.group import Group\nfrom splitwise.user import User\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nuser = User()\nuser.setId(1223)\n\nsuccess, user, errors = sObj.addUserToGroup(user, 4456)\n\nprint(success)\n```\n\n\n### Delete group\nYou can use ```deleteGroup(group_id)``` to delete an existing group.\n\n```python\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nsuccess, errors = sObj.deleteGroup(4456)\n\nprint(success)\n```\n\n\n### Update Expense\n\nYou can use ```updateExpense(Expense)``` to update an existing Expense. It takes in parameter a partial ```Expense``` object and returns an ```Expense``` object.\n\nFollowing things need to be set on the ```Expense``` object.\n\n1. Id\n2. any field you would want to update\n\n\n```python\nfrom splitwise.expense import Expense\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nexpense = Expense()\nexpense.id = 12345678\nexpense.setCost('10')\nexpense.setDescription(\"Updated description\")\n\nexpense, errors = sObj.updateExpense(expense)\nprint(expense.getId())\n```\n\nor update the fetched expense\n\n\n```python\nfrom splitwise.expense import Expense\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nexpense, error = sObj.getExpense(12345)\nexpense.setDescription(\"Updated description\")\n\nexpense, errors = sObj.updateExpense(expense)\nprint(expense.getDescription())\n```\n\n### Delete expense\nYou can use ```deleteExpense(expense_id)``` to delete an existing expense.\n\n```python\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nsuccess, errors = sObj.deleteExpense(4456)\n\nprint(success)\n```\n\n### Get Comments\n\nYou can use ```getComments(id)``` to get the comments made on an expense. It returns an array of ```Comment``` object.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nid = 982430660\ncomments = sObj.getComments(id)\n```\n\n### Create Comment\n\nYou can use ```createComment(Comment)``` to create a new Comment. It takes in parameters expense_id and content and returns a ```Comment``` object.\n\nFollowing are the parameters passed.\n\n1. expense_id\n2. content\n\n```python\n\nfrom splitwise import Splitwise\n\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\n\nexpense_id = 982430660\ncontent = \"Test for create comment\"\n\ncomment, errors = sObj.createComment(expense_id,content)\n\nprint(\"content:\", comment.getContent())\nprint(\"errors:\", errors)\n```\n\n### Get Notifications\n\nYou can use ```getNotifications()``` to get recent Notifications. It returns an array of ```Notification``` object.\n\n```python\nsObj = Splitwise(Config.consumer_key,Config.consumer_secret)\nsObj.setAccessToken(session['access_token'])\nid = 982430660\nnotifications = sObj.getNotifications()\n```\n\n## Objects\n\n### User\n\nMethods:\n\n1. getId() - Returns the id of the user\n2. getFirstName() - Returns the first name of user\n3. getLastName() - Returns the last name of user\n4. getEmail() - Returns the email of the user\n5. getRegistrationStatus() - Returns the registraion status of the user\n6. getPicture() - Returns a ```Picture``` object containing picture details\n7. setId(id) - Sets the id of the user\n8. setFirstName(first_name) - Sets the first name of user\n9. setLastName(last_name) - Sets the last name of user\n10. setEmail(email) - Sets the email of the user\n\n### CurrentUser\n\nCurrent user is inherited from ```User```. All the methods of user are available for current user.\n\nMethods:\n\n1. getDefaultCurrency() - Returns the default currency\n2. getLocale() - Returns the locale\n3. getDateFormat() - Returns the date format\n4. getDefaultGroupId() - Returns the default group id of user\n\n### Friend\n\nFriend is inherited from ```User```. All the methods of user are available for friend.\n\nMethods:\n\n1. getUpdatedAt() - Gets the time when this user information was last updated\n2. getBalances() - Returns a list of ```Balance``` objects\n3. getGroups() - Returns a list of ```FriendGroup``` objects\n\n### Expense User\nExpenseUser is inherited from ```User```. All the methods of user are available for Expense User.\n\nMethods:\n\n1. getPaidShare() - Returns the Paid Share\n2. getOwedShare() - Returns the Owed Share\n3. getNetBalance() - Returns the Net Balance\n4. setPaidShare(paid_share) - Sets the Paid Share\n5. setOwedShare(owed_share) - Sets the Owed Share\n\n### Group\n\nMethods:\n\n1. getId() - Returns the id of the group\n2. getName() - Returns the name of the group\n3. getUpdatedAt() - Get the time this group was last updated\n4. getWhiteBoard() - Get the whiteboard contents of this group\n5. isSimplifiedByDefault() - Returns if group is simplified by default or not\n6. getMembers() - Returns a list of ```Friend``` objects\n7. getOriginalDebts() - Returns a list of  ```Debt``` objects\n8. getType() - Returns the type of group\n9. getGroupType() - Returns the type of group\n10. getSimplifiedDebts() - Returns a list of  ```Debt``` objects\n11. getInviteLink() - Returns the invite link\n12. setName(name) - Sets the name of the group\n13. setCountryCode(code) - Sets the country code of the group\n14. setWhiteBoard(text) - Sets the whiteboard contents of this group\n15. isSimplifiedByDefault(bool) - Sets if group is simplified by default or not\n16. setMembers(users) - Sets a list of ```Friend``` objects\n17. addMember(user) - Add to a list of ```Friend``` objects\n18. setType(type) - Sets the type of group\n19. setGroupType(type) - Sets the type of group\n\n### FriendGroup\n\nMethods:\n\n1. getId() - Returns the id of the group\n2. getBalances() - Returns a list of ```Balance``` object\n3. setId(id) - sets the id of the group\n\n### Balance\n\nMethods:\n\n1. getCurrencyCode() - Returns the currency code.\n2. getAmount() - Returns the amount\n\n### Category\n\nMethods:\n\n1. getSubcategories() - Returns a list of ```Category``` objects\n2. getId() - Returns the id of category\n3. getName() - Returns the name of the category\n\n### Currency\n\nMethods:\n\n1. getCode() - Returns the Currency Code\n2. getUnit() - Returns the Currency Unit\n\n### Debt\n\nMethods:\n\n1. getFromUser() - Returns the id of the from user\n2. getToUser() - Returns the id of the to user\n3. getAmount() - Returns the amount of the debt\n4. getCurrencyCode() - Returns the currency code of debt\n\n\n### Expense\n\nMethods:\n\n1. getId() - Returns the id of expense\n2. getGroupId() - Returns the id of the group expense belongs to\n3. getDescription() - Returns the description of expense\n4. isRepeat() - Returns if expense is repeat or not\n5. getRepeatInterval() - Returns the repeat interval of expense\n6. getEmailReminder() - Returns Email reminder\n7. getEmailReminderInAdvance() - Returns email reminder in advance\n8. getNextRepeat() - Returns the time of next repeat\n9. getDetails() - Returns the detail of expense\n10. getCommentsCount() - Returns the number of comments\n11. getPayment() - Returns the payment of expense\n12. getCreationMethod() - Returns the creation method of expense\n13. getTransactionMethod() - Returns the transaction method of expense\n14. getTransactionConfirmed() - Returns if transaction is confirmed\n15. getCost() - Returns the cost of transaction\n16. getCurrencyCode() - Returns the currency code of transaction\n17. getCreatedBy() - Returns a ```User``` object of user who created the expense\n18. getDate() - Returns the expense date.\n19. getCreatedAt() - Returns the date time expense was created\n20. getUpdatedAt() - Returns the date time expense was last updated\n21. getDeletedAt() - Returns the date time expense was deleted\n22. getReceipt() - Returns a ```Receipt``` object for receipt\n23. getCategory() - Returns a ```Category``` object for category\n24. getUpdatedBy() - Returns a ```User``` object of user who last updated the expense\n25. getDeletedBy() - Returns a ```User``` object of user who deleted the expense\n26. getUsers() - Returns a list of ```ExpenseUser``` objects\n27. getExpenseBundleId() - Returns Expense Bundle ID\n28. getFriendshipId() - Returns the Friendship ID\n29. getRepayments() - Returns a list of ```Debt``` objects\n30. setGroupId(id) - Sets the id of the group expense belongs to\n31. setDescription(description) - Sets the description of expense\n31. setRepeatInterval(interval) - Sets the repeat interval of expense\n33. setCost(cost) - Sets the cost of transaction\n34. setCurrencyCode(code) - Sets the currency code of transaction\n35. setSplitEqually(is_split_equally) - Sets if expense is to be split equally\n36. setReceipt(receipt) - Sets a ```Receipt``` object for receipt\n37. setCategory(category) - Sets a ```Category``` object for category\n38. setUsers(users) - Sets a list of ```ExpenseUser``` objects\n39. addUser(user) - Adds to a list of ```ExpenseUser``` objects\n40. setReceipt(receiptPath) - Adds the file as a receipt\n41. setDetails(details) - Sets the expense details\n\n### Picture\n\nMethods:\n\n1. getSmall() - Returns the link to the small image\n2. getMedium() - Returns the link to the medium image\n3. getLarge() - Returns the link to the large image\n\n### Receipt\n\nMethods:\n\n1. getOriginal() - Returns the link to the original uploaded receipt\n2. getLarge() - Returns the link to large image of uploaded receipt\n\n### Comment\n\nMethods:\n\n1. getId() - Returns the id of the comment\n2. getContent() - Returns comment message\n3. getCommentType() - Returns comment type\n4. getRelationType() - Returns relation type of the comment\n5. getRelationId() - Returns relation id\n6. getCreatedAt() - Returns datetime at which comment was created\n7. getDeletedAt(id) - Returns datetime at which comment was deleted\n8. getUser() - Returns a ```User``` object containing user details\n\n### Notification\n\nMethods:\n\n1. getId() - Returns the id\n2. getContent() - Returns message\n3. getImageShape() - Returns comment type\n4. getImageType() - Returns relation type of the comment\n5. source - Returns source object\n6. getCreatedAt() - Returns datetime at which notification was created\n7. getCreatedBy() - Returns id of user who created notification\n\n### Source\n\nUsed with Notifications.\n\nMethods:\n\n1. getId() - Returns the id\n2. getType() - Returns type. Use in combination with ID to fetch structured data\n3. getUrl() - Returns url\n\n## Sample Application\n\nThis is the [GitHub Link](https://github.com/namaggarwal/flask-splitwise-example) to the sample application written in Flask to show the usage of splitwise application.\n\nLicense\n----\n\nMIT\n\nDonate\n----\n\nIf you think this helped you and you want to donate, you can do it via -\n\n### Paypal\n[https://www.paypal.me/namanagg](https://www.paypal.me/namanagg)\n\n### Bitcoin\n1DNhyZ696ekq6sY5vYMcmBLxLzAtq3oYpM\n","funding_links":["https://www.paypal.me/namanagg"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamaggarwal%2Fsplitwise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamaggarwal%2Fsplitwise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamaggarwal%2Fsplitwise/lists"}