gwdatafind.connect(host=None, port=None)

Open a new connection to a Datafind server.

This method will auto-select between HTTP and HTTPS based on port, and (for HTTPS) will automatically load the necessary X509 credentials using gwdatafind.utils.find_credential().


This method is deprecated and will be removed in a future release

  • host (str, optional) – the name of the datafind server to connect to; if not given will be taken from the GWDATAFIND_SERVER environment variable.

  • port (int, optional) – the port on the server to use, if not given it will be stripped from the host name.


connection (gwdatafind.HTTPConnection or gwdatafind.HTTPSConnection) – a newly opened connection