ra

requests-aws

AWS authentication for Amazon S3 for the python requests module

Showing:

Popularity

Downloads/wk

0

GitHub Stars

113

Maintenance

Last Commit

6yrs ago

Contributors

9

Package

Dependencies

0

License

BSD licence, see LICENCE.txt

Categories

Readme

#S3 using python-requests

AWS authentication for Amazon S3 for the wonderful pyhon requests library

Build Status

  • Tested with python 2.7 and python 3
  • At the moment only S3 is supported

Usage

import requests
from awsauth import S3Auth

ACCESS_KEY = 'ACCESSKEYXXXXXXXXXXXX'
SECRET_KEY = 'AWSSECRETKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'        

url = 'http://mybuck.s3.amazonaws.com/file.txt'
s = 'Lola is sweet'
# Creating a file
r = requests.put(url, data=s, auth=S3Auth(ACCESS_KEY, SECRET_KEY))

# Downloading a file
r = requests.get(url, auth=S3Auth(ACCESS_KEY, SECRET_KEY))
if r.text == 'Lola is sweet':
    print "It works"

# Removing a file
r = requests.delete(url, auth=S3Auth(ACCESS_KEY, SECRET_KEY))

Installation

Installing requests-aws is simple with pip:

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial