Skip to main content
latest Circle CI Coverage Status Requirements Status

Chef auth support for Python-Requests


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

See samstav/okchef first, since thats generally more useful. okchef uses requests-chef to sign and authenticate requests.

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

Metadata

Release files for requests-chef 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for requests-chef 0.1.7
File Size Uploaded Provenance Actions
requests-chef-0.1.7.tar.gz 5.8 kB Without provenance Details for requests-chef-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for requests-chef 0.1.7
File Interpreter ABI Platform Actions
requests_chef-0.1.7-py2.py3-none-any.whl Python 2, Python 3 none any Details for requests_chef-0.1.7-py2.py3-none-any.whl

Total release size: 14.6 kB

Release files / requests-chef-0.1.7.tar.gz

Download URL requests-chef-0.1.7.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9387680a8c99421f711f4f1e434c4ee2e39aec3b63bad85dd9d2c477533973fc
BLAKE2b-256 checksum
How to use checksums
e977103d1baca956bb167b541c2abf7520fafc1582206bd5bbfb9dbd60d9fedf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / requests_chef-0.1.7-py2.py3-none-any.whl

Download URL requests_chef-0.1.7-py2.py3-none-any.whl
Size 8.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
541ddf212539898390fd619100cedd3132e4126261a96a08e80655850c173ce6
BLAKE2b-256 checksum
How to use checksums
06000a8705f28e59adbacd5b53c23ce496122aa2a0c1d37233d7306e2245f32b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for requests-chef 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page