Skip to main content

AWS authentication for Amazon S3 for the python requests module

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

requests-aws-0.1.8.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file requests-aws-0.1.8.tar.gz.

File metadata

  • Download URL: requests-aws-0.1.8.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for requests-aws-0.1.8.tar.gz
Algorithm Hash digest
SHA256 bd2e8386f09d94a84b9cad6e966b21f31493734336a8f47b9b535806949a771f
MD5 bed26e0f9689cb71d3d88ba7308df787
BLAKE2b-256 5e2f4da17752036c04cf4c9af7a2da0d41ef2205043f1c61008006475aa24b8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page