Set of tools and Python scripts to populate a given Google Sheets spreadsheet with information fetched from Balancer API.
-
Follow the pygsheets documentation instructions. The method used in this repository is the "Service Account" one.
-
Create a folder called
authand move the downloadedJSONfile to it. -
Create a
.envfile and add the following line:
SERVICE_ACCOUNT_FILE=auth/your-auth-file.json
-
Install uv via the instructions in the offical uv documentation.
-
Run the following commands:
$ uv sync --locked
$ source .venv/bin/activate # Linux or macOS
$ .venv\Scripts\activate # Windows- 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]",
)- Use
uv runwith the virtual environment activated to run the script. Example:
$ uv run get_token_list.py