Skip to main content

{OPEN} client authentication protocol for python-requests

Project description

This library implements an Authentication handler for requests that provides the Akamai {OPEN} Edgegrid Authentication scheme. For more information visit the Akamai {OPEN} Developer Community.

>>> import requests
>>> from akamai.edgegrid import EdgeGridAuth
>>> from urlparse import urljoin
>>> baseurl = 'https://akaa-WWWWWWWWWWWW.luna.akamaiapis.net/'
>>> s = requests.Session()
>>> s.auth = EdgeGridAuth(
    client_token='ccccccccccccccccc',
    client_secret='ssssssssssssssssss',
    access_token='aaaaaaaaaaaaaaaaaaaaa'
)

>>> result = s.get(urljoin(baseurl, '/diagnostic-tools/v1/locations'))
>>> result.status_code
200
>>> result.json()['locations'][0]
Hongkong, Hong Kong
...

Installation

To install from pip:

$ pip install edgegrid-python

To install from sources:

$ python setup.py install

To run tests:

$ python -m unittest discover

Contribute

  1. Fork the repository to start making your changes to the master branch

  2. Write a test which shows that the bug was fixed or that the feature works as expected.

  3. Send a pull request and bug the maintainer until it gets merged and published. :)

Author

Jonathan Landis

License

Copyright 2014 Akamai Technologies, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

edgegrid-python-1.0.4.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file edgegrid-python-1.0.4.tar.gz.

File metadata

File hashes

Hashes for edgegrid-python-1.0.4.tar.gz
Algorithm Hash digest
SHA256 88cee2655b31aeb03a60b327aee1e675afe63d81d146272570055e4736382008
MD5 fe6bc83ec525708d3b8f7486f26c9882
BLAKE2b-256 ac4d26d4688b07ff3f8e904c921fb047e601e6e94e98034c925735b910bf76d0

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