Skip to main content

Mashery authentication for requests

Project description

Simple class for making authenticated requests to Mashery APIs using the requests 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()

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-auth-mashery-0.0.4.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file requests-auth-mashery-0.0.4.tar.gz.

File metadata

File hashes

Hashes for requests-auth-mashery-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d9ef6009181f610bf0d6d555bc65dfb86def8b5ad1fe381a53f536c99a9d40c4
MD5 838aa7e25bbbd95c98ff255137c4cac2
BLAKE2b-256 53cc8559e960dc56373f2c5f64de5a98fa81a9ca9f912fbfb69d0250186d9cfa

See more details on using hashes here.

Supported by

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