How to use the munch.Munch.__init__ function in munch

To help you get started, we’ve selected a few munch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gerold-penz / python-jsonrpc / pyjsonrpc / rpcresponse.py View on Github external
def __init__(
        self,
        jsonrpc = None,
        id = None,
        result = None,
        error = None
    ):
        """
        :param jsonrpc: JSON-RPC version string
        :param id: JSON-RPC transaction id
        :param result: Result data
        """

        Bunch.__init__(self)
        self.jsonrpc = jsonrpc
        self.id = id
        self.result = result if not error else None
        self.error = error
github gerold-penz / python-jsonrpc / pyjsonrpc / rpcrequest.py View on Github external
def __init__(
        self,
        jsonrpc = None,
        method = None,
        id = None,
        params = None
    ):
        Bunch.__init__(self)

        self.jsonrpc = jsonrpc or "2.0"
        self.method = method
        self.id = id
        self.params = params
github fedora-infra / python-fedora / fedora / client / __init__.py View on Github external
def __init__(self, *args, **kwargs):
        warnings.warn(
            'DictContainer is deprecated.  Use the Munch class'
            ' from python-bunch instead.', DeprecationWarning, stacklevel=2)
        Munch.__init__(self, *args, **kwargs)
github gerold-penz / python-jsonrpc / pyjsonrpc / rpcresponse.py View on Github external
def __init__(self, code, message, data):
            """
            :param code: Error code
            :param message: Error message
            :param data: Additional error informations
            """

            Bunch.__init__(self)
            self.code = code
            self.message = message
            self.data = data