Client.__init__(base_url='IRIS', major_versions=None, user=None, password=None, user_agent='ObsPy/1.0.3 (Linux-2.6.32-042stab120.6-i686-with-debian-wheezy-sid, Python 3.4.4)', debug=False, timeout=120, service_mappings=None, force_redirect=False)[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',
Use e.g. client.help('dataselect') for the
parameter description of the individual services
or client.help() for parameter description of
all webservices.
  • 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 ‘BGR’, ‘EMSC’, ‘ETH’, ‘GEONET’, ‘GFZ’, ‘INGV’, ‘IPGP’, ‘IRIS’, ‘ISC’, ‘KOERI’, ‘LMU’, ‘NCEDC’, ‘NIEP’, ‘NOA’, ‘ODC’, ‘ORFEUS’, ‘RESIF’, ‘SCEDC’, ‘USGS’, ‘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 receive the first byte of the response (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.
  • force_redirect (bool) By default the client will follow all HTTP redirects as long as no credentials (username and password) are given. If credentials are given it will raise an exception when a redirect is discovered. This is done to improve security. Settings this flag to True will force all redirects to be followed even if credentials are given.