Skip to content

Repository files navigation

#S3 using python-requests

AWS authentication for Amazon S3 for the wonderful pyhon requests library

  • Tested with python 2.6 and python 3.3.2
  • At the moment only S3 is supported

Usage

importrequestsfromawsauthimportS3AuthACCESS_KEY='ACCESSKEYXXXXXXXXXXXX'SECRET_KEY='AWSSECRETKEYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX's='Sam is sweet'# Creating a filer=requests.put('http://mybuck.s3.amazonaws.com/file.txt', data=s, auth=S3Auth(ACCESS_KEY, SECRET_KEY))
# Downloading a filer=requests.get('http://mybuck.s3.amazonaws.com/file.txt', auth=S3Auth(ACCESS_KEY, SECRET_KEY))
ifr.text=='Sam is sweet':
print"It works"# Removing a filer=requests.delete('http://mybuck.s3.amazonaws.com/file.txt', auth=S3Auth(ACCESS_KEY, SECRET_KEY))

Installation

Installing requests-aws is simple with pip:

 $ pip install requests-aws

Build Status

About

AWS authentication for Amazon S3 for the python requests module

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages