update_sheet.py
entry point
51 steps
Google Auth
Google Sheets
cli: __main__ guard
cli: argparse
This automation takes information from a local data file and uses it to update a specified Google Sheet, automatically resizing the sheet as needed. It can also notify a designated user about the update.
Flow
Click any step to see details
graph TB
n_update_sheet_get_credentials_compact[["get_credentials() — 15 steps (7 Decision, 5 Output, 3 File I/O)"]]:::compact
n_update_sheet_update_sheet_compact[["update_sheet() — 32 steps (10 Decision, 10 Output, 9 Transform, 2 File I/O, +1 more)"]]:::compact
subgraph n_update_sheet_col_index_to_letter["col_index_to_letter()"]
n_update_sheet_139{"while n #gt;= 0"}:::decision
end
subgraph n_update_sheet_main["main()"]
n_update_sheet_186{"if url"}:::decision
n_update_sheet_187(["Output: print()"]):::output
n_update_sheet_189(["Output: print()"]):::output
n_update_sheet_186 --> n_update_sheet_187
n_update_sheet_187 --> n_update_sheet_189
end
click n_update_sheet_139 call showStepDetail("update_sheet.py", 139)
click n_update_sheet_186 call showStepDetail("update_sheet.py", 186)
click n_update_sheet_187 call showStepDetail("update_sheet.py", 187)
click n_update_sheet_189 call showStepDetail("update_sheet.py", 189)
classDef api fill:#dbeafe,stroke:#2563eb,color:#1e3a5f
classDef fileio fill:#dcfce7,stroke:#16a34a,color:#14532d
classDef dbop fill:#f3e8ff,stroke:#9333ea,color:#3b0764
classDef decision fill:#ffedd5,stroke:#ea580c,color:#7c2d12
classDef output fill:#f3f4f6,stroke:#6b7280,color:#1f2937
classDef transform fill:#ccfbf1,stroke:#0d9488,color:#134e4a
classDef entry fill:#dcfce7,stroke:#16a34a,stroke-width:3px,color:#14532d
classDef compact fill:#f0f4ff,stroke:#6366f1,color:#312e81,stroke-width:2px
API Call
File I/O
Database
Decision
Output
Transform
All Steps
Step Detail
Select a step from the diagram or list to see its details.
Services
- Google Auth (google.oauth2)
- Google Sheets (gspread)
Secrets
- GOOGLE_APPLICATION_CREDENTIALS
- USER_EMAIL
Imports
External
- argparse
- dotenv
- google.auth.transport.requests
- google.oauth2.credentials
- google.oauth2.service_account
- google_auth_oauthlib.flow
- gspread
- json
- os
- pandas
- sys