===================================
Mashery Authentication for Requests
===================================
Simple class for making authenticated requests to Mashery APIs using the `requests <http://python-requests.org>`_ library.
Example
=======
import requests
from requests_auth_mashery import MasheryAuth
def main():
api_key = 'angtfaaez72cc48dun5medxn'
api_secret = 'Vbafpwzsve'
mashery_auth = MasheryAuth(api_key, api_secret)
payload = {
'entitytype': 'artist',
'query': 'weezer',
'format': 'json',
}
url = 'http://api.rovicorp.com/search/v2.1/music/search'
r = requests.get(url, auth=mashery_auth, params=payload)
print r.content
if __name__ == '__main__':
main()
Mashery Authentication for Requests
===================================
Simple class for making authenticated requests to Mashery APIs using the `requests <http://python-requests.org>`_ library.
Example
=======
import requests
from requests_auth_mashery import MasheryAuth
def main():
api_key = 'angtfaaez72cc48dun5medxn'
api_secret = 'Vbafpwzsve'
mashery_auth = MasheryAuth(api_key, api_secret)
payload = {
'entitytype': 'artist',
'query': 'weezer',
'format': 'json',
}
url = 'http://api.rovicorp.com/search/v2.1/music/search'
r = requests.get(url, auth=mashery_auth, params=payload)
print r.content
if __name__ == '__main__':
main()
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-auth-mashery-0.0.1.tar.gz.
File metadata
- Download URL: requests-auth-mashery-0.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae011775d2522eb986b2dac03c46e8d9acb659a731ac61401031278803b6c29
|
|
| MD5 |
e17f95f795ab33237bab02e56a676866
|
|
| BLAKE2b-256 |
371c3fdc1739d8f5f8fdce4549ddb26af32b26a91e8aaa9beffce6b3783fb7f9
|