python client library for Chef Server
Project description
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'}
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
Release history Release notifications | RSS feed
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.1.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file okchef-1.2.1.tar.gz
.
File metadata
- Download URL: okchef-1.2.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dbefe41b364d457f727224b3c79dbe9bc2426fe91222fbde56aec36c3c2a001 |
|
MD5 | a1029cef66d72a455ddaf29818b4411f |
|
BLAKE2b-256 | e171523289ede824840f98a9366738e1e4e579939b1f49fa718a6473987f55a6 |
File details
Details for the file okchef-1.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: okchef-1.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894ae7dc75ff9466ce533e5064a4d757b16241b1df50fe68d1d3bcef7372fff5 |
|
MD5 | c03d4efdb967cd2898c4dab5a24dd99a |
|
BLAKE2b-256 | 1755d501dd782e42d826e147d0367f980c77f473cf3acbde20c546c61380cb36 |