Skip to main content

python client library for Chef Server

Project description

latest Circle CI Coverage Status Requirements Status

import chef

client = chef.ChefClient('https://api.opscode.com')
# not to be confused with chef-client, the agent :)
client.authenticate('chef-user', '~/chef-user.pem')
response = client.get('/users/chef-user')
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'}

Authentication & Authorization

okchef uses the auth handler from the requests-chef library at https://github.com/samstav/requests-chef

Install

Before installing okchef, see the current installation instructions for requests-chef: https://github.com/samstav/requests-chef#install

If you don’t feel like reading those, you can use --process-dependency-links (for now)

$ pip install -U --process-dependency-links okchef

Preferably, you’ve read the install for requests-chef, so this will work:

# -U ensures you get the latest version
$ pip install -U okchef

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

okchef-1.2.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

okchef-1.2.4-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file okchef-1.2.4.tar.gz.

File metadata

  • Download URL: okchef-1.2.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for okchef-1.2.4.tar.gz
Algorithm Hash digest
SHA256 635d6f0b600068f2c3990dda31506194a578e4e270b81be1b7df29498dce54c1
MD5 59c7c294785bdce0441e7e2f214d3593
BLAKE2b-256 228f854c6bb4f8683665dbbef0abd589d3110fd20534c4c1b5f6d4083fc3bff5

See more details on using hashes here.

File details

Details for the file okchef-1.2.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for okchef-1.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 31ffb24ffc47d9c67c9f8201e93dd0dc30ccda270bb3108b775e3bcea707a7da
MD5 3c4ca2dd60c7c16b4e28e441fe30fbb6
BLAKE2b-256 6e4f5a82c48af72862c6fe1954f02dbc947c969236eddb897de51731ccc5b5b4

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