From a39059030d511eddb70500bc9fa01df3d38f2905 Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 26 Sep 2013 18:43:33 -0700 Subject: fix issues to work in Python 3.3.2 --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2296d51..9805601 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ AWS authentication for Amazon S3 for the wonderful [pyhon requests library](http://python-requests.org) -- Tested with python 2.6 +- Tested with python 2.6 and python 3.3.2 - At the moment only S3 is supported ## Usage @@ -17,15 +17,15 @@ SECRET_KEY = 'AWSSECRETKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' s = 'Sam is sweet' # Creating a file -r = requests.put('http://mybucket.s3.amazonaws.com/file.txt', data=s, auth=S3Auth(ACCESS_KEY, SECRET_KEY)) +r = requests.put('http://mybuck.s3.amazonaws.com/file.txt', data=s, auth=S3Auth(ACCESS_KEY, SECRET_KEY)) # Downloading a file -r = requests.get('http://mybucket.s3.amazonaws.com/file.txt', auth=S3Auth(ACCESS_KEY, SECRET_KEY)) -if r.content == 'Sam is sweet': - print 'Hala Madrid!' +r = requests.get('http://mybuck.s3.amazonaws.com/file.txt', auth=S3Auth(ACCESS_KEY, SECRET_KEY)) +if r.text == 'Sam is sweet': + print "It works" # Removing a file -r = requests.delete('http://mybucket.s3.amazonaws.com/file.txt', auth=S3Auth(ACCESS_KEY, SECRET_KEY)) +r = requests.delete('http://mybuck.s3.amazonaws.com/file.txt', auth=S3Auth(ACCESS_KEY, SECRET_KEY)) ``` @@ -36,4 +36,4 @@ Installing requests-aws is simple with pip: $ pip install requests-aws ``` -[![Build Status](https://travis-ci.org/tax/python-requests-aws.png?branch=master)](https://travis-ci.org/tax/python-requests-aws) \ No newline at end of file +[![Build Status](https://travis-ci.org/tax/python-requests-aws.png?branch=master)](https://travis-ci.org/tax/python-requests-aws) -- cgit v1.2.1