obspy.fdsn.client.Client.__init__

Client.__init__(base_url=u'IRIS', major_versions=None, user=None, password=None, user_agent=u'ObsPy 0.10.2 (Linux-2.6.32-042stab092.3-i686-with-Ubuntu-12.04-precise, Python 2.7.3)', debug=False, timeout=120, service_mappings=None)[source]

Initializes an FDSN Web Service client.

>>> client = Client("IRIS")
>>> print(client)  
FDSN Webservice Client (base url: http://service.iris.edu)
Available Services: 'dataselect' (v...), 'event' (v...),
'station' (v...), 'available_event_catalogs',
'available_event_contributors'
Use e.g. client.help('dataselect') for the
parameter description of the individual services
or client.help() for parameter description of
all webservices.
Parameters:
  • base_url (str) Base URL of FDSN web service compatible server (e.g. “http://service.iris.edu”) or key string for recognized server (one of u’BGR’, u’ETH’, u’GEONET’, u’GFZ’, u’INGV’, u’IPGP’, u’IRIS’, u’KOERI’, u’LMU’, u’NCEDC’, u’NEIP’, u’NERIES’, u’ODC’, u’ORFEUS’, u’RESIF’, u’SCEDC’, u’USGS’, u’USP’).
  • major_versions (dict) Allows to specify custom major version numbers for individual services (e.g. major_versions={‘station’: 2, ‘dataselect’: 3}), otherwise the latest version at time of implementation will be used.
  • user (str) User name of HTTP Digest Authentication for access to restricted data.
  • password (str) Password of HTTP Digest Authentication for access to restricted data.
  • user_agent (str) The user agent for all requests.
  • debug (bool) Debug flag.
  • timeout (float) Maximum time (in seconds) to wait for a single request to finish (after which an exception is raised).
  • service_mappings (dict) For advanced use only. Allows the direct setting of the endpoints of the different services. (e.g. service_mappings={'station': 'http://example.com/test/stat/1'}) Valid keys are event, station, and dataselect. This will overwrite the base_url and major_versions arguments. For all services not specified, the default default locations indicated by base_url and major_versions will be used. Any service that is manually specified as None (e.g. service_mappings={'event': None}) will be deactivated.