Socket
Socket
Sign inDemoInstall

requests-aws

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    requests-aws

AWS authentication for Amazon S3 for the python requests module


Maintainers
1

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:

    $ pip install requests-aws

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc