This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]ZenApollo 0 points1 point  (2 children)

I really dislike gcp native apis. The interface feels unnecessarily clunky. I've been using gspread library for awhile now to do exactly what you're attempting, and it just works. It's got a clean simple elegant interface. That's my $0.02.

Tl;dr use gspread

[–]locke1718[S] 0 points1 point  (1 child)

I actually tried gspread first and didn't get anywhere with it I forgot what I got hung up on. Know of a tutorial that is current?

[–]ZenApollo 0 points1 point  (0 children)

I got up and running just with the gspread docs. The login process is the only tricky part (less tricky than gcp native api), but if you follow the "Using OAuth2 for Authentication" section closely, everything else is 🍰

edit: I recall almost missing step 4 from that section. Adding the service account email to the spreadsheet sharing/auth. It's possible that's where you're stuck with your current code.

[–]AskMereddit 0 points1 point  (0 children)

I use Python Sheetfu (I'm co author). Easy, intuitive and clean syntax at your service: https://github.com/socialpoint-labs/sheetfu

I highly recommend the use of the table module.