# Path: shippo/error.py
# class ShippoError(Exception):
# class APIError(ShippoError):
# class APIConnectionError(ShippoError):
# class AddressError(ShippoError):
# class InvalidRequestError(ShippoError):
# class AuthenticationError(ShippoError):
#     def __init__(self, message=None, http_body=None, http_status=None,
#                  json_body=None):
#     def __init__(self, message, param, code, http_body=None,
#                  http_status=None, json_body=None):
#     def __init__(self, message, param, http_body=None,
#                  http_status=None, json_body=None):
# 
# Path: shippo/http_client.py
# def new_default_http_client(*args, **kwargs):
#     def __init__(self, verify_ssl_certs=True):
#     def request(self, method, url, headers, post_data=None):
#     def request(self, method, url, headers, post_data=None):
#     def _handle_request_error(self, e):
#     def request(self, method, url, headers, post_data=None):
#     def _handle_request_error(self, e, url):
# class HTTPClient(object):
# class RequestsClient(HTTPClient):
# class UrlFetchClient(HTTPClient):
# 
# Path: shippo/util.py

# 
# Path: shippo/certificate_blacklist.py
# BLACKLISTED_DIGESTS = {
# }
# def verify(hostname, certificate):
# 
# Path: shippo/version.py
# VERSION = '2.1.2'


import calendar
import datetime
import os
import platform
import socket
import ssl
import time
import urllib.parse
import warnings
import shippo
from shippo import error, http_client, util, certificate_blacklist
from shippo.version import VERSION
        from shippo.config import verify_ssl_certs
        from shippo.config import api_version
            from shippo.config import api_key
        from shippo.config import verify_ssl_certs
            for subvalue in value:
                yield ("%s[]" % (key,), subvalue)
        elif isinstance(value, dict):
            subdict = dict(('%s[%s]' % (key, subkey), subvalue) for
                           subkey, subvalue in list(value.items()))
            for subkey, subvalue in _api_encode(subdict):
                yield (subkey, subvalue)
        elif isinstance(value, datetime.datetime):
            yield (key, _encode_datetime(value))
        else:
            yield (key, value)


def _build_api_url(url, query):
    scheme, netloc, path, base_query, fragment = urllib.parse.urlsplit(url)

    if base_query:
        query = '%s&%s' % (base_query, query)

    return urllib.parse.urlunsplit((scheme, netloc, path, query, fragment))


class APIRequestor(object):

    _CERTIFICATE_VERIFIED = False

    def __init__(self, key=None, client=None):
        self.api_key = key



# Path: shippo/error.py
# class ShippoError(Exception):
# class APIError(ShippoError):
# class APIConnectionError(ShippoError):
# class AddressError(ShippoError):
# class InvalidRequestError(ShippoError):
# class AuthenticationError(ShippoError):
#     def __init__(self, message=None, http_body=None, http_status=None,
#                  json_body=None):
#     def __init__(self, message, param, code, http_body=None,
#                  http_status=None, json_body=None):
#     def __init__(self, message, param, http_body=None,
#                  http_status=None, json_body=None):
# 
# Path: shippo/http_client.py
# def new_default_http_client(*args, **kwargs):
#     def __init__(self, verify_ssl_certs=True):
#     def request(self, method, url, headers, post_data=None):
#     def request(self, method, url, headers, post_data=None):
#     def _handle_request_error(self, e):
#     def request(self, method, url, headers, post_data=None):
#     def _handle_request_error(self, e, url):
# class HTTPClient(object):
# class RequestsClient(HTTPClient):
# class UrlFetchClient(HTTPClient):
# 
# Path: shippo/util.py

# 
# Path: shippo/certificate_blacklist.py
# BLACKLISTED_DIGESTS = {
# }
# def verify(hostname, certificate):
# 
# Path: shippo/version.py
# VERSION = '2.1.2'


# Path: shippo/api_requestor.py
import calendar
import datetime
import os
import platform
import socket
import ssl
import time
import urllib.parse
import warnings
import shippo
from shippo import error, http_client, util, certificate_blacklist
from shippo.version import VERSION
        from shippo.config import verify_ssl_certs
        from shippo.config import api_version
            from shippo.config import api_key
        from shippo.config import verify_ssl_certs

            for subvalue in value:
                yield ("%s[]" % (key,), subvalue)
        elif isinstance(value, dict):
            subdict = dict(('%s[%s]' % (key, subkey), subvalue) for
                           subkey, subvalue in list(value.items()))
            for subkey, subvalue in _api_encode(subdict):
                yield (subkey, subvalue)
        elif isinstance(value, datetime.datetime):
            yield (key, _encode_datetime(value))
        else:
            yield (key, value)


def _build_api_url(url, query):
    scheme, netloc, path, base_query, fragment = urllib.parse.urlsplit(url)

    if base_query:
        query = '%s&%s' % (base_query, query)

    return urllib.parse.urlunsplit((scheme, netloc, path, query, fragment))


class APIRequestor(object):

    _CERTIFICATE_VERIFIED = False

    def __init__(self, key=None, client=None):
        self.api_key = key



        self._client = client or http_client.new_default_http_client(