Live data from Hacker News

Google Spreadsheets and Python

twilio.com

11–20 of 143 posts

Re: Google Spreadsheets and Python

#11

Having run an (internal) app that is deeply integrated with Google Sheets for about a year, I think that Sheets is good and bad. It's _extremely_ powerful for allowing business users to easily get access to and manipulate data manually. Downside is that it really struggles past a few thousand rows when you've got more than 20 or so columns. Definitely good for a quick and dirty way to expose data to internal users, b…

If anyone from Google is reading this: please add a database (yes, like a cloud version of MS ACCESS) in the Google Docs/Drive suite.

Has anyone looked at "Fusion Tables?"

A google search reveals that is what it is supposed to be.

Re: Google Spreadsheets and Python

#13
post #4

I think there's a bit of a gap in the software ecosystem today in that there's no tool that lets semi-technical people like myself create simple applications, e.g. to read and write to databases. Bit like MS Access used to do. Google Spreadsheets actually goes a long way (I've done some stuff using the IF function etc. in it), but obviously has its limits. So combining it with Python sounds interesting. Not sure if i…

Have you seen AirTable? It's definitely the best modern alternative to Access I've seen - easy to create tables, great web UI and a phenomenal iOS mobile app. https://www.airtable.com

Why are the row limits so tight?! 1200 rows for the free tier, and only 5000 rows for the first paid tier!

That's crazy low, given that Google Sheets gives you 200,000 cells, or 10,000 20-column rows, for free.

EDIT: That was from 2009. The current limit is 2,000,000 cells per sheet: https://support.google.com/drive/answer/37603?hl=en

Re: Google Spreadsheets and Python

#14

Having run an (internal) app that is deeply integrated with Google Sheets for about a year, I think that Sheets is good and bad. It's _extremely_ powerful for allowing business users to easily get access to and manipulate data manually. Downside is that it really struggles past a few thousand rows when you've got more than 20 or so columns. Definitely good for a quick and dirty way to expose data to internal users, b…

If anyone from Google is reading this: please add a database (yes, like a cloud version of MS ACCESS) in the Google Docs/Drive suite. Has anyone looked at "Fusion Tables?" A google search reveals that is what it is supposed to be.

They already have one its called CloudSQL https://cloud.google.com/sql/

Re: Google Spreadsheets and Python

#15
Potentially, putting the python function into a AWS Lambda function (or any other serverless function) + attaching an API gateway, you could make a RESTful endpoint for all the CRUD operators for google sheets. Could be a extremely light weight way of storing data and exposing it through REST :)

Re: Google Spreadsheets and Python

#16

Earlier quoted context omitted.

If anyone from Google is reading this: please add a database (yes, like a cloud version of MS ACCESS) in the Google Docs/Drive suite. Has anyone looked at "Fusion Tables?" A google search reveals that is what it is supposed to be.

They already have one its called CloudSQL https://cloud.google.com/sql/

That's not part of the drive/docs suite.

Re: Google Spreadsheets and Python

#17
https://gspread.readthedocs.io/en/latest/ is great, but it's limited in what kinds of things it can set (formatting, notes, etc.). One other option is to create an endpoint on script.google.com which can access a much richer SpreadsheetApp API: https://developers.google.com/apps-script/reference/spreadsh... . You can POST to it using an auth token from the same service account oauth creds (though you need to add drive and drive.scripts to your scopes), and it can run arbitrary JS to translate reads and writes from the JSON payload/response into API calls.

As another note, we realized that far more useful than using Google Spreadsheets as the canonical backing database, was to be able to bidirectionally synchronize it with our primary database. That way, users who wanted to annotate entities in spreadsheet form could do so in GSheets, always working with up-to-date data, and keeping track of "I updated a.x in the spreadsheet, but a.y was updated upstream, so merge the two." Here were the semantics of our integration:

    Returns a list of updates between last_synced_data and sheet.
    Subsequently, if upstream_data is provided, then load it into the sheet,
    adding rows on the end as needed, or merging if there is a match in the merge_key column
    (note that any updates to the live sheet data since the last sync
    override any upstream data, and those live updates are returned without changing the live sheet).
The caller would then be responsible for taking the returned list of updates and cleaning it for the database, as well as maintaining a record of what the state of the last sync was. Essentially we maintain enough information to do a three-way merge. We've since built internal applications that allow real-time spreadsheet-like interactions in a much more domain-specific manner, but it definitely did the job for quite a while.

If there's interest in seeing open-source code for all of this, we could definitely extract from our corporate repo (we're https://www.belstone.com/ ). Let me know!

Re: Google Spreadsheets and Python

#18
post #17

https://gspread.readthedocs.io/en/latest/ is great, but it's limited in what kinds of things it can set (formatting, notes, etc.). One other option is to create an endpoint on script.google.com which can access a much richer SpreadsheetApp API: https://developers.google.com/apps-script/reference/spreadsh... . You can POST to it using an auth token from the same service account oauth creds (though you need to add driv…

Yes, please post to github, gitlab, or bitbucket!

Re: Google Spreadsheets and Python

#19
post #17

https://gspread.readthedocs.io/en/latest/ is great, but it's limited in what kinds of things it can set (formatting, notes, etc.). One other option is to create an endpoint on script.google.com which can access a much richer SpreadsheetApp API: https://developers.google.com/apps-script/reference/spreadsh... . You can POST to it using an auth token from the same service account oauth creds (though you need to add driv…

(author here) Would love to see the code for this!
Post reply on HN