obspy.clients.fdsn.client.Client.__init__¶
-
Client.
__init__
(base_url='IRIS', major_versions=None, user=None, password=None, user_agent='ObsPy/1.1.1 (Linux-4.16.13-300.fc28.x86_64-x86_64-with-fedora-31-Rawhide, Python 3.7.3)', debug=False, timeout=120, service_mappings=None, force_redirect=False, eida_token=None)[source]¶ Initializes an FDSN Web Service client.
>>> client = Client("IRIS") >>> print(client) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE 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 ‘BGR’, ‘EMSC’, ‘ETH’, ‘GEONET’, ‘GFZ’, ‘ICGC’, ‘INGV’, ‘IPGP’, ‘IRIS’, ‘ISC’, ‘KNMI’, ‘KOERI’, ‘LMU’, ‘NCEDC’, ‘NIEP’, ‘NOA’, ‘ODC’, ‘ORFEUS’, ‘RESIF’, ‘SCEDC’, ‘TEXNET’, ‘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 areevent
,station
, anddataselect
. This will overwrite thebase_url
andmajor_versions
arguments. For all services not specified, the default default locations indicated bybase_url
andmajor_versions
will be used. Any service that is manually specified asNone
(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.eida_token (str) – Token for EIDA authentication mechanism, see http://geofon.gfz-potsdam.de/waveform/archive/auth/index.php. If a token is provided, options
user
andpassword
must not be used. This mechanism is only available on select EIDA nodes. The token can be provided in form of the PGP message as a string, or the filename of a local file with the PGP message in it.