def __init__( self, client=None, wsdl_client=None, cache=None, timeout=300, operation_timeout=None, session=None, verify_ssl=True, proxy=None, ): if httpx is None: raise RuntimeError( "The AsyncTransport is based on the httpx module") self.cache = cache self.wsdl_client = wsdl_client or httpx.Client( verify=verify_ssl, proxies=proxy, timeout=timeout, ) self.client = client or httpx.AsyncClient( verify=verify_ssl, proxies=proxy, timeout=operation_timeout, ) self.logger = logging.getLogger(__name__) self.wsdl_client.headers = { "User-Agent": "Zeep/%s (www.python-zeep.org)" % (get_version()) } self.client.headers = { "User-Agent": "Zeep/%s (www.python-zeep.org)" % (get_version()) }
def __init__(self, cache=NotSet, timeout=300, operation_timeout=None, verify=True, http_auth=None): """The transport object handles all communication to the SOAP server. :param cache: The cache object to be used to cache GET requests :param timeout: The timeout for loading wsdl and xsd documents. :param operation_timeout: The timeout for operations (POST/GET). By default this is None (no timeout). :param verify: Boolean to indicate if the SSL certificate needs to be verified. :param http_auth: HTTP authentication, passed to requests. """ self.cache = SqliteCache() if cache is NotSet else cache self.load_timeout = timeout self.operation_timeout = None self.verify = verify self.http_auth = http_auth self.logger = logging.getLogger(__name__) self.session = self.create_session() self.session.verify = verify self.session.auth = http_auth self.session.headers['User-Agent'] = ('Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, cache=None, timeout=300, operation_timeout=None, session=None): self.cache = cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.session = session or Session() self.session.headers['User-Agent'] = ( 'Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, cache=None, timeout=300, operation_timeout=None, session=None): self.cache = cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.session = session or Session() self.session.headers['User-Agent'] = ( 'Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, cache=NotSet, timeout=300, verify=True, http_auth=None): self.cache = SqliteCache() if cache is NotSet else cache self.timeout = timeout self.verify = verify self.http_auth = http_auth self.session = self.create_session() self.session.verify = verify self.session.auth = http_auth self.session.headers['User-Agent'] = ( 'Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, cache=NotSet, timeout=300, verify=True, http_auth=None): self.cache = SqliteCache() if cache is NotSet else cache self.timeout = timeout self.verify = verify self.http_auth = http_auth self.logger = logging.getLogger(__name__) self.session = self.create_session() self.session.verify = verify self.session.auth = http_auth self.session.headers['User-Agent'] = ('Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, cache=NotSet, timeout=300, verify=True, http_auth=None, **post_xml_format_options): self.cache = SqliteCache() if cache is NotSet else cache self.timeout = timeout self.verify = verify self.http_auth = http_auth self.logger = logging.getLogger(__name__) self.post_xml_format_options = post_xml_format_options self.session = self.create_session() self.session.verify = verify self.session.auth = http_auth self.session.headers['User-Agent'] = ( 'Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, loop, cache=None, timeout=300, operation_timeout=None, session=None): self.loop = loop if loop else asyncio.get_event_loop() self.cache = cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.session = session or aiohttp.ClientSession(loop=self.loop) self._close_session = session is None self.session._default_headers['User-Agent'] = ( 'Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, loop, cache=None, timeout=300, operation_timeout=None, session=None): self.loop = loop if loop else asyncio.get_event_loop() self.cache = cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.session = session or aiohttp.ClientSession(loop=self.loop) self._close_session = session is None self.session._default_headers['User-Agent'] = ( 'Zeep/%s (www.python-zeep.org)' % (get_version()))
def __init__(self, cache=None, timeout=300, operation_timeout=None, session=None): self.cache = cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.session = session or requests.Session() self.session.mount("file://", FileAdapter()) self.session.headers[ "User-Agent"] = "Zeep/%s (www.python-zeep.org)" % (get_version())
def __init__(self, cache=NotSet, timeout=300, operation_timeout=None, verify=True, http_auth=None): self.cache = SqliteCache() if cache is NotSet else cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.http_verify = verify self.http_auth = http_auth self.http_headers = { 'User-Agent': 'Zeep/%s (www.python-zeep.org)' % (get_version()) } self.session = self.create_session()
def __init__( self, loop, cache=None, timeout=300, operation_timeout=None, session=None, verify_ssl=True, proxy=None, ): self.loop = loop if loop else asyncio.get_event_loop() self.cache = cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.verify_ssl = verify_ssl self.proxy = proxy self.session = session or aiohttp.ClientSession(loop=self.loop) self._close_session = session is None self.session._default_headers[ "User-Agent"] = "Zeep/%s (www.python-zeep.org)" % (get_version())
def __init__(self, cache=NotSet, timeout=300, operation_timeout=None, verify=True, http_auth=None): """The transport object handles all communication to the SOAP server. :param cache: The cache object to be used to cache GET requests :param timeout: The timeout for loading wsdl and xsd documents. :param operation_timeout: The timeout for operations (POST/GET). By default this is None (no timeout). :param verify: Boolean to indicate if the SSL certificate needs to be verified. :param http_auth: HTTP authentication, passed to requests. """ self.cache = SqliteCache() if cache is NotSet else cache self.load_timeout = timeout self.operation_timeout = operation_timeout self.logger = logging.getLogger(__name__) self.http_verify = verify self.http_auth = http_auth self.http_headers = { 'User-Agent': 'Zeep/%s (www.python-zeep.org)' % (get_version()) } self.session = self.create_session()