AWS News Blog

AWS SDK for Python (Boto) Now Supports Python 3

The AWS SDK for Python (also known as Boto) has been updated and is now compatible with Python 3. You can now build AWS applications using versions 2.6, 2.7, 3.3, and 3.4 of Python. Here’s a screen shot of some Boto code running on Python 3.4.1:


(py3)$ python
Python 3.4.1 (default, May 19 2014, 13:10:29)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-583.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto
>>> s3 = boto.connect_s3()
>>> bucket = s3.create_bucket('boto-py3-test')
>>> from boto.s3.key import Key
>>> item = Key(bucket)
>>> item.key = 'hello.txt'
>>> item.set_contents_from_string('Boto and Python 3 rock!')
23
>>> item = bucket.get_key('hello.txt')
>>> item.get_contents_as_string().decode('utf-8')
'Boto and Python 3 rock!'
>>> 

We would not have been able to make this happen without the open source contributions from the amazing Boto community. You can download the latest version of Boto from PyPi or GitHub and start using AWS for your Python 3 projects today! For more information about supported services and specific, service-by-service compatibility, read the Boto Documentation.

Jeff;

TAGS:
Jeff Barr

Jeff Barr

Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.