Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tax/python-requests-aws

Repository files navigation

#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:

 $ pip install requests-aws

About

AWS authentication for Amazon S3 for the python requests module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9

Languages

AltStyle によって変換されたページ (->オリジナル) /