Skip to main content

Chef Authentication protocol support for Python-Requests

Project description

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'}

Install

This project currently requires a fork of pyca/cryptography due to the following related issues:

Instructions

First, install this fork of cryptography directly from github.

$ pip install git+https://github.com/samstav/cryptography.git@rsa-bypass-hash-on-signer

If you don’t do this first, you’d have to use the (deprecated, scheduled for removal) --process-dependency-links option through pip, since pip no longer respects dependency links by default (as of pip 1.5).

$ pip install --process-dependency-links requests-chef

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

Uploaded Source

File details

Details for the file requests-chef-0.0.4.tar.gz.

File metadata

File hashes

Hashes for requests-chef-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8b4456dad5aec500809f37d0d1d5cd39a35fd5f1c4f9f59c692473fc3ccefae4
MD5 846f02d9bb160302d7e736a185230de4
BLAKE2b-256 8beb6a6bba1530cd3c32e534656aef2ab434866fdf5dd0ba2e01552041b92441

See more details on using hashes here.

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