# Path: kano_world/config.py
# API_URL = CONF['api_url']


import requests
        import ast
from kano.logging import logger
from kano_world.config import API_URL
from pprint import pformat
    from kano_settings.system.proxy import get_requests_proxies
def _remove_sensitive_data(request_debug):
    if request_debug \
       and 'data' in request_debug \
       and request_debug['data']:

        try:
            data = ast.literal_eval(str(request_debug['data']))

            if 'password' in data:
                data['password'] = 'removed'
                request_debug['data'] = data
        except:
            logger.warn("Failed to parse request data")

    return request_debug


def request_wrapper(method, endpoint, data=None, headers=None,
                    session=None, files=None, params=None):
    if method not in ['put', 'get', 'post', 'delete']:
        return False, "Wrong method name!", None

    if session:
        req_object = session
    else:
        req_object = requests

    method = getattr(req_object, method)

    request_debug = {

# Path: kano_world/config.py
# API_URL = CONF['api_url']


# Path: kano_world/connection.py
import requests
        import ast
from kano.logging import logger
from kano_world.config import API_URL
from pprint import pformat
    from kano_settings.system.proxy import get_requests_proxies

def _remove_sensitive_data(request_debug):
    if request_debug \
       and 'data' in request_debug \
       and request_debug['data']:

        try:
            data = ast.literal_eval(str(request_debug['data']))

            if 'password' in data:
                data['password'] = 'removed'
                request_debug['data'] = data
        except:
            logger.warn("Failed to parse request data")

    return request_debug


def request_wrapper(method, endpoint, data=None, headers=None,
                    session=None, files=None, params=None):
    if method not in ['put', 'get', 'post', 'delete']:
        return False, "Wrong method name!", None

    if session:
        req_object = session
    else:
        req_object = requests

    method = getattr(req_object, method)

    request_debug = {

        'url': API_URL + endpoint,