Skip to content

tiago-hansen/balancer-api-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balancer API scripts

Set of tools and Python scripts to populate a given Google Sheets spreadsheet with information fetched from Balancer API.

Google Cloud setup

  1. Follow the pygsheets documentation instructions. The method used in this repository is the "Service Account" one.

  2. Create a folder called auth and move the downloaded JSON file to it.

  3. Create a .env file and add the following line:

SERVICE_ACCOUNT_FILE=auth/your-auth-file.json

Environment activation and running the project

  1. Install uv via the instructions in the offical uv documentation.

  2. Run the following commands:

$ uv sync --locked

$ source .venv/bin/activate # Linux or macOS

$ .venv\Scripts\activate # Windows
  1. Adjust the main() function calling with your own spreadsheet and worksheet names:
if __name__ == "__main__":
    main(
        spreadsheet_name="[your spreadsheet name]",
        worksheet_name="[your worksheet name]",
    )
  1. Use uv run with the virtual environment activated to run the script. Example:
$ uv run get_token_list.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published