# Path: rakuten_ws/compat.py
#     def iteritems(d):
#     def is_bytes(x):
#     def callable(obj):
#     def iteritems(d):
#     def is_bytes(x):
# def to_unicode(obj, encoding='utf-8'):


import re
import requests
from collections import OrderedDict, MutableMapping
from shutil import copyfileobj
from mimetypes import guess_type
from io import BytesIO, open
from xmljson import Parker
from lxml.etree import Element, fromstring, tostring
from .compat import iteritems, to_unicode, is_py2, str, urlparse, pathname2url
# -*- coding: utf-8 -*-
from __future__ import unicode_literals







parker = Parker(dict_type=dict)


class PrettyStringRepr(str):
    # Useful for debug
    def __repr__(self):
        if is_py2:
            return to_unicode(self.replace(' \n', '\n').strip()).encode('utf-8')

# Path: rakuten_ws/compat.py
#     def iteritems(d):
#     def is_bytes(x):
#     def callable(obj):
#     def iteritems(d):
#     def is_bytes(x):
# def to_unicode(obj, encoding='utf-8'):


# Path: rakuten_ws/utils.py
import re
import requests
from collections import OrderedDict, MutableMapping
from shutil import copyfileobj
from mimetypes import guess_type
from io import BytesIO, open
from xmljson import Parker
from lxml.etree import Element, fromstring, tostring
from .compat import iteritems, to_unicode, is_py2, str, urlparse, pathname2url

# -*- coding: utf-8 -*-
from __future__ import unicode_literals







parker = Parker(dict_type=dict)


class PrettyStringRepr(str):
    # Useful for debug
    def __repr__(self):
        if is_py2:
            return to_unicode(self.replace(' \n', '\n').strip()).encode('utf-8')

        else: