def __init__(<EOL>self,<EOL>api_key=None,<EOL>json_encoder=SendwithusJSONEncoder,<EOL>raise_errors=False,<EOL>default_timeout=None,<EOL>**kwargs<EOL>):
if not api_key:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>self.API_KEY = api_key<EOL>self.DEFAULT_TIMEOUT = default_timeout<EOL>self._json_encoder = json_encoder<EOL>self._raise_errors = raise_errors<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.API_HOST = kwargs['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.API_PROTO = kwargs['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.API_PORT = kwargs['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.API_VERSION = kwargs['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.DEBUG = kwargs['<STR_LIT>']<EOL><DEDENT>if self.DEBUG:<EOL><INDENT>logging.basicConfig(format=LOGGER_FORMAT, level=logging.DEBUG)<EOL>logger.debug('<STR_LIT>')<EOL>logger.propagate = True<EOL><DEDENT>
Constructor, expects api key