Python 3.5 support for Google-Contacts V3 API - python-3.x

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.

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)

GData Py3k version: pip install -e git+https://github.com/dvska/gdata-python3#egg=gdata

Related

how to activate python3 in Google-cloud-data

I am using Python3 for my projects. However, the Google Cloud Datalab runs with Python2.7.x by default. How do I change to Python3?
Datalab only supports Python 2 for now unfortunately.
One thing you can try is install the Pydatalab lib, which is a Jupyter extension that adds support for a number of Google Cloud Platform services to your Jupyter notebooks. That library supports Python 3.
It looks like that they support Python 3 now:
https://github.com/googledatalab/datalab/issues/902 .

upload file video on youtube using a python programm

I m working on a little project and I need a way to upload video on youtube using python programm, I searched on github and I find a programm that do this but it is in python2 and I need one in python3 also it is very difficult to manipulate. So does someone knows some programms thats upload video on youtube and it is written in python3
You didn't mention the program that you had found, so I searched github.
The first hit is https://github.com/tokland/youtube-upload, and according to the readme, this is compatible with Python 3.x. You will need the google api python client too, and of course you will need an api key to use with it, but these are available.
An alternative is shoogle https://github.com/tokland/shoogle, which only supports python 3.x

Send email with Twisted on Python3

I see several examples here about sending email with Twisted. However, I've read that twisted-mail isn't going to be ported on Python 3.
Has Twisted got any alternative in Python3 or manipulation with e-mail is away?
According to this page, there is a plan to bring twisted into Python 3 with full functionality.
However, there are also some other e-mail modules available in Python 3.
This is a
tutorial which uses smtplib, a module which uses the SMTP protocol.
There is also an email module built in to Python 3, as detailed here in the docs.

Is twisted conch available in python 3?

I noticed twisted.conch is not part of dist3.py for python 3.Is it not yet migrated to python 3? I dont find any recent updates on the same when i search. I was planning to use it to establish multiple telnet sessions which ll help asses logs in my django app and also help debug live django application using manhole.
IS there an alternate i can use for my use case?
I checked out asyncio. However, my understanding is it might freeze the application during debug which would not suit my need.do correct me if my understanding is wrong..
pls point me to latest twisted package for python 3 with conch support if available . if not, do you have any alternate suggestions?

Python 3 support for fabric

Does fabric (http://docs.fabfile.org/en/1.7/) support Python 3 yet. As per Python 3 Wall of Superpowers it does not yet.
If not what is the best alternative if using Django 1.5 with Python 3.
Current advice
It seems there is already official support for Python 3.4+ in Fabric v2+ and I guess it should be preferred although there may be some incompatible changes. So in an ideal world, nobody should have this problem anymore :)
pip3 install -U "fabric>2.0"
Maintained old API in Python 3
Because some people were happy with the old API of the Fabric, there is a maintained fork supporting Python 3 called fab-classic. See also discussion in the Github issue Recreating the Fabric 1 API in Fabric 2?
The previous advice
There is Python3 port of Fabric named Fabric3 which supports Python 2.7 and 3.4+ (dropped support for Python <2.7). I use it some time as a replacement and it works for me without any issues.
pip3 install fabric3
Current Answer which has already been done by #miso.belica
pip install -U "fabric>2.0.0"
OLD Answer (as of 2013)
From the docs:
Please note that all documentation is currently written with Python
2.5 users in mind, but with an eye for eventual Python 3.x compatibility
Or to be more specific:
eventual Python 3.x compatibility
It looks like Python3 support for fabric is a little sticky and depends upon another open source library, paramiko being compatible with python3. As of now, the master version supports python 3.
It might be worth messing around with and then building your fabric instance on top of that instead of getting it from pip.
You could also create a separate python2.7 virtualenv just for fabric:
sudo virtualenv --no-site-packages -p /usr/bin/python fabric-env
source /var/www/APPNAME/fabric-env/bin/activate
sudo /var/www/APPNAME/fabric-env/bin/pip install fabric
deactivate
Then:
/var/www/APPNAME/fabric-env/bin/fab -f /var/www/APPNAME/fabfile.py FAB_COMMAND
It seems that Fabric is going through a rewrite and that Fabric 2.0 will be python 3.x compatible. At least this is what I read between the line of the roadmap below. However, I cannot find the Fabric 2.0 repository or branch, so, hard to fully confirm.
http://www.fabfile.org/roadmap.html
For those looking for a supported version of Fabric 1.x, there's a fork which is maintained:
https://github.com/ploxiln/fab-classic
I recommend using it in case you don't want to rewrite all the existing code. And it works with Python 3.7.
We've switched from fabric3==1.14.post1 to fab-classic==1.15.2 without any problems.
It is actually possible to get Fabric to work with Python 3. You can see how I did it in this gist.
In the comments above, #rnevius suggests that invoke is meant as a successor of Fabric 1.x, however that is not completely correct. From the invoke docs:
Thus, Invoke was created to focus exclusively on local and abstract
concerns, leaving Fabric 2.x concerned only with servers and
network commands.
It thus seems that Fabric 2.x will be built on top of invoke. Hopefully, Fabric 2.x will be available soon, so Python2 can die as quickly as possible.
By this day "fabric 2" is awailable to work with python 3+.
"fabric 3" is unofficial fork.
To install "fabric 2" from https://pypi.org/project/Fabric/ :
pip install Fabric

Resources