Bestoon python client.
A simple python client for Bestoon Project
python in your system.git clone https://github.com/Nimaebrazeh/bestoon-python-client.pip install -r requirements.txtYou can set your API token key first with instance of client:
bestoon = Bestoon(YOUR-TOKEN) # make an Bestoon object and set API token to YOUR-TOKEN
If you forgot API token key, use login() method instead of above way (This method returns your API token):
bestoon = Bestoon() # make an Bestoon objectbestoon.login(YOUR-USERNAME, YOUR-PASSWORD) # return API tokenbestoon.set_token(YOUR-TOKEN) # set API token to YOUR-TOKEN
Set your expense with amount and text in arguments
bestoon.set_expense('30000', 'Test')
Set your income with amount and text in arguments
bestoon.set_income('50000', 'Test')
Get your expenses with number(optional) in arguments
bestoon.get_expenses() # return all expenses as json formatbestoon.get_expenses(5) # return last 5 expenses as json format
Get your incomes with number(optional) in arguments
bestoon.get_incomes() # return all incomes as json formatbestoon.get_incomes(5) # return last 5 incomes as json format
You can manage your general status of expenses and incomes.
bestoon.get_general_status() # return amount count and amount sum of all incomes and expenses
The MIT License (MIT). Please see License File for more information.