Combines Google Spreadsheets API and a web crawler to summarize currently investment values.
-
It's recommended to create a virtual enviroment. Follow these steps to create one:
# Skip this if 'venv' is already installed pip install venv # Change to your project directory cd <your_project_directory> # Create a virtual environment (you can name it as you wish) python -m venv <your_venv_name> # Activate the virtual environment source <your_venv_name>/bin/activate
-
Use the following commands to install necessary packages.
pip install -r requirements.txt
- Put Key file:
- Drag your IAM key file into root directory.
- Configure Key Path:
- in
config.ini [spread_sheet] >> credentials_Path
, specify the path for the key file.
- in
- Configure Filename and Sheetname:
- in
config.ini [spread_sheet] >> filename
, specify your Google SpreadSheet's filename. - in
config.ini [spread_sheet] >> fund_spreadsheet_name
, specify the Google SpreadSheet's sheetname which included your fund codes.
- in
- Configure Key:
- in
config.ini [CoinMarketCap] >> key
, Enter your key.
- in
- Configure Sheetname:
- in
config.ini [spread_sheet] >> crypto_id_spreadsheet_name
, specify the Google SpreadSheet's sheetname which included your crypto coin ids.
- in
- Duplicate from a template:
- Rename the file and tab:
- Rename the file and tab name as your wish; this will be configured in step 4.
- List Your Funds in the SpreadSheet:
- Customize your profolio with the fund name and currency ... etc.
- Open target website:
- Visit www.stockq.org.
- Get brand and code:
- Fill the Info in SpreadSheet:
- Populate the spreadsheet with the acquired information.
- Run Mode:
- In the last row of main.py, there's an optional parameter, that determines whether to display, write or do both. Default is 1.
result = loop.run_until_complete(main(0)) # show only result = loop.run_until_complete(main(1)) # write only result = loop.run_until_complete(main(2)) # both show and write
- In the last row of main.py, there's an optional parameter, that determines whether to display, write or do both. Default is 1.
- Use the built-in functions of spreadsheets to calculate the summerized value of all listed funds for today.