dimitryzub / monobank-googlesheets-api

Tracking personal finance from Monobank to Google Sheets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personal Financial Tracker using Monobank API and Google Sheets API for Python

Note: this script only read/write/update/clear (and so on) stuff, that all it does. Just simple tasks.

Also, You can replace Monobank API code to the bank you're using, or add more if needed.

Preparation:

  • Go to Console Google Cloud.
  • Go to API's and Services --> Library. Find Google Sheets API and Enable it. Or use direct link.
  • Go to Credentials, hit Create New Credentials. Once at "Grant this service account access to project" setting, choose Editor role. Next step is optional.
  • After newly created credentials you should see them under Service Accounts. Click on email --> Keys --> Add Key --> Create New Key --> Type: JSON (file will be downloaded)
  • Put this file in the same directory where .py file is located or use os.path or use Authorize Requests.

Then:

  • Create Google Sheet or use existing.
  • In the access settings, choose email that was created earlier in Console Google Cloud.
  • Paste code from this repo.

Usage:

Lines from main.py

SERVICE_ACCOUNT_FILE = 'keys.json'` # Change to the JSON file that was downloaded earlier.
SAMPLE_SPREADSHEET_ID` = 'your spreadsheet id' 
# Example: https://docs.google.com/spreadsheets/d/**YOUR_SPREADSHEET_ID**/edit#gid=0

Example output:

example_spreadsheet_output

Libraries used:

Links:

About

Tracking personal finance from Monobank to Google Sheets.


Languages

Language:Python 100.0%