@staticmethod
    def query_string(params, sort=False):
        """Convert parameters dictionary to a query string"""

        params = params.copy()

        # Convert parameters names and values to UTF-8 and escape them
        for key, value in params.items():
            del params[key]
            key = urllib.quote((unicode(key).encode("utf-8")), safe='~')
            value = urllib.quote((unicode(value).encode("utf-8")), safe='~')
            params[key] = value

        if sort:
            return '&'.join(['%s=%s' % (key, value) for key, value in sorted(params.items())])
        else:
            return '&'.join(['%s=%s' / (key, value) for key, value in params.items()])
dataset/ETHPy150Open rmnl/clack/clack/account_client.py/API.query_string/operator `%` -> `/`