I'm trying to work with the Google contacts API using Python 3.5, this presents an issue because the gdata library that is supposed to be used is not up to date for use with Python 3.5. I can use oAuth2 to grab the contact data in JSON and use that in my project, but part of the application is also adding a contact into the users contact list. I cannot find any documentation on this part, besides using the Gdata library, something I cannot do. The majority of project requires Python 3 so, switching to Python 2 would just not be something I could easily do. Is there any further documentation or a work around using the gdata library with Python 3? I'm actually very surprised that the contacts API seems so thinly supported on Python. If anyone has any further information it would be much appreciated.
Asked
Active
Viewed 742 times
1
-
As an alternative, try using People API which is supported in [google-api-python-client](https://pypi.python.org/pypi/google-api-python-client/) for python 2 - 3.6. As stated in this [post](http://stackoverflow.com/a/36401355/5995040), if you'll be getting the contacts of the user you can use People API to fetch the contacts that are under the account "My contacts" contacts, while Contacts API will also fetch the other contacts lists ("Other contacts", "Most contacts", ...). Hope this helps. – Mr.Rebot Mar 20 '17 at 23:51
-
Thanks I'll look into it. Unfortunately my program also needs to be able to add contacts and I don't believe the People API will let you do that, only get them. I'll give it a look tho. Thanks again. – Christopher Nelson Mar 21 '17 at 10:38
2 Answers
1
For me I had to install like pip install git+https://github.com/dvska/gdata-python3
(without the egg). Since the package itself contains src
dir. Otherwise import gdata
would fail. (python 3.6.5 in virtual env)

fpghost
- 2,834
- 4
- 32
- 61
0
GData Py3k version: pip install -e git+https://github.com/dvska/gdata-python3#egg=gdata

dvska
- 2,399
- 1
- 19
- 14
-
I tried your version for python 3 but didn't manage to make it work. Would be great as i also need to create contacts, as Christopher said, so People API is not an option – Enric Mieza Feb 17 '18 at 11:53