Skip to main content

Chef Authentication protocol support for Python-Requests

Project description

latest
Chef auth support for Python-Requests
import requests_chef

auth = requests_chef.ChefAuth('chef-user', '~/chef-user.pem')
response = requests.get('https://api.chef.io/users/chef-user',
                        headers={'X-Chef-Version': '12.0.2'},
                        auth=auth)
response.json()
    {'display_name': 'chef-user',
     'email': 'chef-user@example.com',
     'first_name': 'Chef',
     'last_name': 'User',
     'middle_name': '',
     'public_key': '-----BEGIN PUBLIC KEY-----\nMIIBIj...IDAQAB\n-----END PUBLIC KEY-----\n',
     'username': 'chef-user'}

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-chef-0.0.3.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

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