<commit_before>requests-chef
=============

| |latest|  |Circle CI|  |Coverage Status|  |Requirements Status|

`Chef auth <https://docs.chef.io/auth.html#authentication-headers>`__ support for `Python-Requests <http://docs.python-requests.org/en/latest/>`__
--------------------------------------------------------------------------------------------------------------------------------------------------
|

.. code:: python

    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': '<EMAIL>',
     '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 <https://github.com/samstav/okchef>`__ first, since
thats generally more useful.
`okchef <https://github.com/samstav/okchef>`__ uses
`requests-chef <https://github.com/samstav/requests-chef>`__ to sign
and authenticate requests.
<commit_msg>missing import<commit_after>requests-chef
=============

| |latest|  |Circle CI|  |Coverage Status|  |Requirements Status|

`Chef auth <https://docs.chef.io/auth.html#authentication-headers>`__ support for `Python-Requests <http://docs.python-requests.org/en/latest/>`__
--------------------------------------------------------------------------------------------------------------------------------------------------
|

.. code:: python

    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': '<EMAIL>',
     '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 <https://github.com/samstav/okchef>`__ first, since
thats generally more useful.
`okchef <https://github.com/samstav/okchef>`__ uses
`requests-chef <https://github.com/samstav/requests-chef>`__ to sign
and authenticate requests.

{'fraction_non_alphanumeric': 0.289484206317473, 'fraction_numerical': 0.003198720511795282, 'mean_word_length': 1.9093023255813955, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5575314', 'n_tokens_mistral': 798, 'n_tokens_neox': 763, 'n_words': 131}