Access google sheets like a csv file - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: Code sharing (https://python-forum.io/forum-5.html) +--- Thread: Access google sheets like a csv file (/thread-1600.html) |
Access google sheets like a csv file - perttybug - Jan-15-2017 Hello all, I wrote a python library for accessing google sheets based on google's new sheet api v4, named pygsheets. Its well documented and is much more intutive than the google client. Checkout a small use case you want to share a numpy array with your remote friend import pygsheets gc = pygsheets.authorize() # Open spreadsheet and then workseet sh = gc.open('my new ssheet') wks = sh.sheet1 # Update a cell with value (just to let him know values is updated ;) ) wks.update_cell('A1', "Hey numpy array is updated") # update the sheet with array wks.update_cells('A2', my_nparray.to_list()) # share the sheet with your friend sh.share("[email protected]")More at : http://github.com/nithinmurali/pygsheets Any contributions are welcome :) Its based on another library which uses api v3 - gspread RE: Access google sheets like a csv file - micseydel - Jan-16-2017 Thanks for sharing! RE: Access google sheets like a csv file - wavic - Jan-16-2017 Why do you use comments instead of __doc___? RE: Access google sheets like a csv file - micseydel - Jan-16-2017 (Jan-16-2017, 06:18 PM)wavic Wrote: Why do you use comments instead of __doc___?Could you elaborate? RE: Access google sheets like a csv file - wavic - Jan-17-2017 Hm! It's nothing. These are not functions definitions. I was almost asleep RE: Access google sheets like a csv file - scriptso - Jan-26-2017 (Jan-16-2017, 06:19 PM)micseydel Wrote:(Jan-16-2017, 06:18 PM)wavic Wrote: Why do you use comments instead of __doc___?Could you elaborate? Hmmm I briefly checked out the source of github but I imagine wavic is referring to usin "_doc_" in order """ tags used in you pyScipts to indicate the associations the they have with each other? @wavic Would I be right to say so? Can't see any other explanation lol ... Your code is squeaky clean as far as I saw, following PEP-* guidelines should be used at nauseum just because it establishes the habit to write industry standard but I say abstraction is beauty, what matter most is logic flow... unless your being paid for or having a project open-sourced with intend of having contributes for further "extension-ability"... what matter to me the most is that I can just see the source and follow logic... however it may be implemented. Then again I have no reservations when even writing everyday plain text in my bastardized. way outdated l33t jargon/sms speak... at the detriment sounding illiterate ... almost at every post lol @prettybug .. this projects is awesome! thanks for the share! forked+ !! |