This project arose from a personal need to optimize the amount of time I spent on creating expenses on Splitwise (a big portion of it being toggling between my bank account and Splitwise's tabs on my browser and selecting various parameters when creating an expense on Splitwise's interface). So, to reduce the amount of time I've created this tool which is meant to be used as a command line utility.
The following pre-requisites are required before using the tool.
- Clone this repo.
- Install Poetry on your local system.
- Run the following commands:
poetry shell
poetry install
- Create an account on Splitwise if you don't have one already.
- Register your application and get your consumer key, secret and API key.
- Navigate to this repo on your local system -> Rename the
.env_template
file to.env
and paste theconsumer key
,consumer secret
andAPI key
you recieved from Splitwise.
Uploading expenses on Splitwise is a two-phase process.
- In this phase, you will need a csv of all the transactions you would like to upload on Splitwise (can be downloaded from your bank account).
- We will first clean this csv file and make it ready for the second phase. To clean the file, run the following command on your terminal.
poetry run python src/scripts/run_clean_csv.py <path to the csv file>
- Depending on the contents of the file, you will be asked a series of prompts that will be used to clean the csv file.
- Once the file has been cleaned, it will be stored in the following directory
src/data/clean/
with the following name<file name>_clean.csv
- In phase two, we will use the cleaned csv file to upload the expenses on Splitwise.
- To upload the expenses, run the following command on your terminal.
poetry run python src/scripts/run_upload_expenses.py src/data/clean/<file name>_clean.csv
- Just like in phase one, you will be asked a series of prompts that will be used to upload the expense on Splitwise.
- Ability to split expense between more than two people.
- Full test suite.