@rishi6310: I suggest following this https://www.analyticsvidhya.com/blog/2020/07/read-and-update-google-spreadsheets-with-python/
Not very detailed, so you might have to read more from the Google API OAuth system. I cannot share code because I don't have it on me. Quick Github search might help too. I might code such a system but it's not on my priority list currently.
I hope you find what you're looking for.