pychef | Python library to interact with the Chef server API

 by   coderanger Python Version: 0.3.0 License: Non-SPDX

kandi X-RAY | pychef Summary

kandi X-RAY | pychef Summary

pychef is a Python library. pychef has no bugs, it has no vulnerabilities, it has build file available and it has high support. However pychef has a Non-SPDX License. You can install using 'pip install pychef' or download it from GitHub, PyPI.

Python library to interact with the Chef server API
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pychef has a highly active ecosystem.
              It has 198 star(s) with 114 fork(s). There are 15 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 19 open issues and 21 have been closed. On average issues are closed in 157 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pychef is 0.3.0

            kandi-Quality Quality

              pychef has 0 bugs and 0 code smells.

            kandi-Security Security

              pychef has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pychef code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pychef has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              pychef releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              pychef saves you 714 person hours of effort in developing the same functionality from scratch.
              It has 1650 lines of code, 217 functions and 35 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pychef and discovered the below as its top functions. This is intended to give you an instant insight into pychef implemented functionality, and help decide if they suit your requirements.
            • Return a dict of all chef roles
            • Return an instance of the chef API
            • Return the configured API
            • Load configuration from a config file
            • Create a new instance of a bag
            • Make a request to the API
            • Make a HTTP request
            • Query chef tags
            • Generates a function that returns a chef query
            • Save the configuration to the Chef server
            • Return a merged dictionary
            • Create an object from a search response
            • Create a new instance from an error
            • Reload ace attributes
            • List all available servers
            • Return the global api
            • Create a Chef instance
            • Create a new Chef instance
            • Save this instance
            • Populate the node attributes
            • Create an instance from a JSON dictionary
            • Populates the object attributes from the data dict
            • Return the object of the object
            • Create a chef environment
            • Load the RSA key
            • Return a dict representation of the client
            Get all kandi verified functions for this library.

            pychef Key Features

            No Key Features are available at this moment for pychef.

            pychef Examples and Code Snippets

            Python Pychef: Not able to search attributes using class chef.Search
            Pythondot img1Lines of Code : 4dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            for nodes in $(knife node list); do knife node show $nodes -r; done
            
            for nodes in $(knife node list); do knife node show $nodes -r | grep COOKBOOK; done
            

            Community Discussions

            QUESTION

            PyChef - Is there REST API to get chef-client runs
            Asked 2019-Oct-03 at 07:08

            I am trying to pull chef-client runs details. We are using PyChef currently and able to get information on the list of nodes connected with the Chef Server and its corresponding run_list. Is there an option in PyChef to get information on the client runs (start time, end time, status of the run, etc)

            Used the following code:

            ...

            ANSWER

            Answered 2017-Sep-12 at 15:39

            By default Chef Server does not save that information. It is part of the older Chef Reporting commercial addon and the newer Chef Automate system. As I've never used either, there is no direct API support for those in PyChef but you can always use the raw API object to make simple requests yourself. For example, looking at https://docs.chef.io/api_reporting.html#reports-nodes-node-runs you could use api['/reports/nodes/foo.example.com/runs'] to get a list of the run IDs for that node.

            Source https://stackoverflow.com/questions/46174738

            QUESTION

            pass pem file,certificate and user to authenticate
            Asked 2019-Jun-19 at 08:13

            I am trying to authenticate with chef api. To authenticate with chef api i need to pass in pem file, user and certificate. How can i pass that using requests module.

            Below is what i am trying

            ...

            ANSWER

            Answered 2019-Jun-19 at 08:13

            try pychef by coderanger or you can get an inspiration from chef-api

            Source https://stackoverflow.com/questions/56325017

            QUESTION

            pyChef: How do I disable SSL verification using chef.autoconfigure()
            Asked 2018-Jan-23 at 20:30

            I'd like to start using pyChef but my dev environment has a self-signed certificate, so I keep getting an SSL error due to 'SSL: CERTIFICATE_VERIFY_FAILED'.

            I see that chef.ChefAPI allows for ssl_verify=False, but does not work when using within chef.autoconfigure(). Can I auto-configure ssl verification?

            I would like to make this script require no manual configuration from the user, how do I disable SSL verification using chef.autoconfigure(), or do I need to still need to call chef.ChefAPI on each query (or set default) and disable it there?

            Maybe there are potential workarounds in Python as well to call the cert?

            ...

            ANSWER

            Answered 2018-Jan-23 at 20:30

            I didn't make that easy since I think disabling TLS should be an absolute last resort. If you're using a self-signed cert, you can do the normal thing of setting the $SSL_CERT_FILE environment variable to the certificate path. But if you must:

            Source https://stackoverflow.com/questions/48409771

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pychef

            You can install using 'pip install pychef' or download it from GitHub, PyPI.
            You can use pychef like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install PyChef

          • CLONE
          • HTTPS

            https://github.com/coderanger/pychef.git

          • CLI

            gh repo clone coderanger/pychef

          • sshUrl

            git@github.com:coderanger/pychef.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link