Google Sheets and Python integration - gspread API
Вставка
- Опубліковано 10 лют 2025
- Short tutorial of how integrate Google Sheets with Python through the Gspread API
Github repository: github.com/Ovi...
Linkedin: / vinicius-oviedo
Fiverr: fiverr.com/use...
Upwork: www.upwork.com...
Bom vídeo, meu mano!!
Valeu o feedback!
I started using google sheet as a database in my python project today. I was just going to pull the data and show it in a table, but your video gave me the idea that I could improve my project much more with pandas😍
Thanks.
(sorry google translate)
Very nice! Thank you for sharing it. Glad it helped you 😀💪
help a lot , thanks bro
So cool
Thanks for the feedback!
module 'gspread' has no attribute 'service_account' how to solve this ?
It can be due to several factors. It follows a checklist:
• Update your gspread version
• Make sure you have your json file within the working directory (it can not be named 'gspread')
• Check if all imported libraries are installed in your machine
• In last case, you can search for this issue in StackOverflow. I saw there are some answered questions concerning the same issue.
By followong the tutorial, it is supposed to not have any issue after this checklist.
Hope it helped. Thanks!
@@viniciuso.4996 I've copied the same to same path but they showing FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\h\\Documents\\pract-1.json'
@@samiulislam3908 Assuming you are using VS Code, have you clicked 'Open Folder' before running the script? Let me know if it worked, otherwise, feel free to reach me through e-mail (oviedo.vinicius@gmail.com). Best!
Could you please show, how to check the version of the worksheet ?...using gspread
Not sure if it is possible. However, I suggest you to take a look at the gspread documentation: docs.gspread.org/en/v6.0.0/
Hi. I really enjoyed your video, and appreciate your efforts to make the world a better place. I wish I could also have such lnowledge to offer. I have questions: 1.How long does a service key last? 2. can it be used in an html forms without the user having a google account?
Grateful for the feedback!
1. I am not sure, but I suppose it is active for all the time the Google Cloud Platform project is active.
2. As it is a user credentials, I think so. However, this topic is out of my knowledge.
@@viniciuso.4996 Thanks. I did everything as you said but I keep getting errors for three hours: create_conectionsock.connect(sa)
@@susanca8443 it was not supposed to get errors. No ideia of what happend. Make sure to get your credentials and install all the libraries.
@@viniciuso.4996 Thanks. You are right. It was the comple=icted auth stuff. I decided to use googleforms for my purposes, since I do not need calculations and hence python is not needed. By the way, I was talking to a new author on Facebook and he mentioned your youtube channel. He has just written one o the best novels, but I have to read it before I tell you the title. I hope you'll read it too.
Is this API for Google Cloud free?
Yes. It is essentially free 😀. However, be aware when using with other GCP services that are chargeable.
Oie! Tudo bem? Bom vídeo. Como você instalou o gspread? Pra mim aparece que não existe nenhuma pasta com o nome gspread quando eu tento fazer o import.
Aparece:
File "", line 1, in
NameError: name 'gc' is not defined. Did you forget to import 'gc'?
quando eu coloco no python pra importar
Oi Bianca. Obrigado pelo feedback!!
Sobre o erro... Você precisa instalar ele antes usando pip install gspread. Assim, deve funcionar ;)