Hacker News new | past | comments | ask | show | jobs | submit login
Sheetfu – Python library to interact with Google Sheets V4 API (github.com/socialpoint-labs)
224 points by jeanloolz on Jan 1, 2020 | hide | past | favorite | 28 comments



Seems like re-creating pygsheets, no? https://github.com/nithinmurali/pygsheets


Author here: Sheetfu original goal was to port the Google Apps Script API for spreadsheet (made in javascript) to Python, so you'll see a lot of common ground between those 2 libs.

You could probably achieve the same with both Pygsheet and Sheetfu, the interface is a bit different. Sheetfu, however, contains the Table module, which completely abstracts the coordinate system for a more ORM-ish syntax.


Similar in function, different in application? They don't need to call it yapygsheets for it to be their own.


These lib names, lmao


Anyone tried airtable? It seems like it's designed specifically for this, and looks nice, but the fact that they limit number of rows per table on the free plan is a bit of a WTF.


I've tinkered with Airtable a bit and it's a solid product. It's a "database" shown in the style of a spreadsheet. With a number of great features, but of course you got to pay for that.

The plan limit for free I get. However overall I think they use the records-per-base limit as their major "please don't use us for anything automated" function. You couldn't, say, build a light CRM on anything less than the enterprise version because 50k records (for pro aka $20/user/mo) just wouldn't cut it.

For those people who need database type powers for a very very small company - it's really impressive. Anyone larger...probably builds something themselves.


I also messed around with Airtable a bit and I do agree that it's a very polished experience. Interestingly, I've noticed that there's actually a large amount of real estate agents who are sick of Salesforce and are very hyped for Airtable. They're waiting for Airtable to add some essential features Salesforce has before jumping ship.


This remark is really intriguing me. It sounds like a business opportunity. I'm very interested to discuss about what real estate agents are waiting from Airtable.


What are some of the features missing in Airtable that you think would make it more palatable for real estate agents to use?


I think we can cut Airtable a little slack since it's geared towards professionals/businesses instead of average consumers. Kind of like how Slack puts a cap on the number of messages in their free version.


I have been using https://github.com/burnash/gspread for a while now, very happy with it. Does Sheetfu do anything better?


As far as I know, Gspread does not handle data other than cells values. Sheetfu can however, you can get or set notes, and colors for example. Pygsheet also can do that.

Sheetfu contains the Table module which gives you the possibility to interact with your sheet as it it was a database table (as close as we can get to ORM-ish approach).


First impression: get_field_name and set_field_name seem quite verbose when one could simply get / set attributes directly


Yeah, this could be more pythonic for sure. Setter and getter methods are always a bit iffy in Python, usually their presence in a library doesn’t bode well.

They could make some of them work with the same syntax as dictionaries, which would be a good start.


> usually their presence in a library doesn’t bode well

Yuuup. My personal favorite is SendGrid/Twilio's email envelope handling, in which the way you add multiple headers is by .... assigning to an attribute multiple times:

    mail_object.header = "header 1"
    mail_object.header = "header 2"
    mail_object.send()  # Sends with headers ["header 1", "header 2"]


As convenient as you may find it, that behavior seems really unexpected so I don't think that qualifies as a great example


It’s a great example of poorly designed APIs, that was his point.


Thanks. I missed his sarcastic tone entirely, but now I see it.


Is it possible using this or pygsheets to open a sheet that is editable by link without authorizing your account?


No. The API's require authentication to function.


also see stencila https://stenci.la


Looks like nice stuff but this is not yet something that can be used if one is not part of the closed beta.


is there something like this for gmail? Where I could query emails from Python and act on them?


GMail has an IMAP-interface. You can use any imap-capable solution, including pythons own imaplib.


IMAP cannot operate on a whole thread at a time. Ironically you will hardly notice the difference when operating with the web interface, which is very much thread based, but it can be useful to apply a label to a whole thread if your interaction with GMail happens in Thunderbird or mutt. For example, I have a Google Apps script that adds a label to a whole thread whenever someone CCs me on a bug, so that the entire bug suddenly pops up in the "my bugs" Thunderbird folder, including messages prior to my being added.


Yes and no. You must fetch the whole thread in a seperate request and handle them specifically. Bit more work, but simple.

https://developers.google.com/gmail/imap/imap-extensions#acc...


There's a restful Gmail API, and Python bindings.

https://developers.google.com/gmail/api/downloads





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: