Do you feel annoyed with calculation work after having fun with friends? For example, you went to skiing with friends. You paid the fee for skiing, but Tom rent the car and Jen took charge in food burget. After the joyful time, you and friends have to sit down, calculate the total fee and figure out if there is extra money you should pay.
Although they are simple calculation tasks just using Plus or Minus, but when all of friends contribute to the team burget and the calculationn work accummulating, it is so tired to do such work.
I built a microservice with FastAPI, Databricks to solve the split money problem and automatic calculate the account and everyone's fee for you.
Hope this microservice will save my time lol.
-
/open
open new burget for calcuation, get the hashcode for payment. -
/pay/{hashcode}/{your name}/{other's name}/{money}/{item}
record the payment from you for others (If it works for all members please use "all") in the burget, which identified by hashcode If you pay the bill and you can clear the bill used this API. -
/cal/{hashcode}
Do calculation for you and show the result. -
/delete/{hashcode}/{item index}
Delete one entry in record -
/download/{hashcode}/
Download the csv report for spliting money
CI/CD is supported by AWS ECR and automatically deployed on AWS APP RUNNER
// Execute CI/CD with the command
make deploy
Usage: cli_tool.py [OPTIONS] COMMAND [ARGS]...
CLI to query SQL database
Options:
--help Show this message and exit.
Commands:
cli-connect Check if codebase is connected to databricks in Azure...
cli-query Query record based on code
project1
fan_project1
├── LICENSE
├── Makefile
├── README.md
├── __pycache__
│ └── test_pytmp.cpython-38-pytest-7.1.3.pyc
├── app.py
├── cli_tool.py
├── dbtool
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-38.pyc
│ │ └── dbst.cpython-38.pyc
│ └── dbst.py
├── pytmp.py
├── requirements.txt
└── test_pytmp.py
3 directories, 13 files
default.diamonds
Default databricks dataset in Azure for testing connection.
money
The table to store records that users enter. The dataset from users and me.
Schema:
-
front-end design
I only implement the json api call of the microservice. And by the end of Sept, I will add some UI-design with Vue make it more user-friendly. Welcome suggestions!
-
deployment
I will deploy in my own website. And later I will publish the link. Feel free to ask me the link if you are interested in this small tool!
-
Authentication and Security
I will not introduce the account in this tool, otherwise all of people can visit the burget with link(code), users can make it private by passwords.
yl734
Eva Lin
Have fun with code😎