OAuthlib authentication support for Requests.
Project description
This project provides first-class OAuth library support for Requests.
Usage
OAuth takes many forms, so let’s take a look at a few different forms:
import requests from requests_authlib import OAuth1 url = u'https://api.twitter.com/1/account/settings.json' client_key = u'...' client_secret = u'...' resource_owner_key = u'...' resource_owner_secret = u'...'
Query signing:
queryoauth = OAuth1(client_key, client_secret, resource_owner_key, resource_owner_secret, signature_type='query') r = requests.get(url, auth=queryoauth)
Header signing:
headeroauth = OAuth1(client_key, client_secret, resource_owner_key, resource_owner_secret, signature_type='auth_header') r = requests.get(url, auth=headeroauth)
Body signing:
bodyoauth = OAuth1(client_key, client_secret, resource_owner_key, resource_owner_secret, signature_type='body') r = requests.post(url, auth=bodyoauth)
Installation
To install requests, you can use pip:
$ pip install requests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file requests-oauthlib-0.2.0.tar.gz
.
File metadata
- Download URL: requests-oauthlib-0.2.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e963faeeb6d263aa16c10aa55970c031489e75de4d7242c2a7c1e323f965ca99 |
|
MD5 | ef04f3229ae62c61f5702cdfc0cb39d6 |
|
BLAKE2b-256 | 10ee696fde84054c15c7d530ac3bfb02390865e2eb0abd6b3bc9db7e2edf9382 |