Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tax/python-requests-aws
AWS authentication for Amazon S3 for the python requests module
https://github.com/tax/python-requests-aws
Last synced: 24 days ago
JSON representation
AWS authentication for Amazon S3 for the python requests module
- Host: GitHub
- URL: https://github.com/tax/python-requests-aws
- Owner: tax
- License: other
- Created: 2012-01-13T13:29:14.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-05-03T09:05:18.000Z (over 6 years ago)
- Last Synced: 2024-11-14T13:44:19.704Z (29 days ago)
- Language: Python
- Size: 252 KB
- Stars: 114
- Watchers: 8
- Forks: 53
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- starred-awesome - python-requests-aws - AWS authentication for Amazon S3 for the python requests module (Python)
README
#S3 using python-requests
AWS authentication for Amazon S3 for the wonderful [pyhon requests library](http://python-requests.org)
[![Build Status](https://travis-ci.org/tax/python-requests-aws.svg?branch=master)](https://travis-ci.org/tax/python-requests-aws)
- Tested with python 2.7 and python 3
- At the moment only S3 is supported## Usage
```python
import requests
from awsauth import S3AuthACCESS_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
```