===================================
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 = 'EXAMPLE'
api_secret = 'EXAMPLE'
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 = 'EXAMPLE'
api_secret = 'EXAMPLE'
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.2.tar.gz.
File metadata
- Download URL: requests-auth-mashery-0.0.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ab6aedf6d5d5b27dc299752c5216be481987a024b6bbeec40e00e7bab926240
|
|
| MD5 |
bace79204bc7dcebfb9f57fd09a2bb08
|
|
| BLAKE2b-256 |
b940b5e02491a6b568887b5b24b0f1cb2e42f816a433210114572ea49c3c5fdd
|