class BaseRoutingClient(debug=False, timeout=120, include_providers=None, exclude_providers=None, credentials=None)[source]

Bases: obspy.clients.base.HTTPClient




Public Methods


Return a semantic version number of the remote service as a string.


Get stations from multiple data centers.


Get waveforms from multiple data centers.

Private Methods


Private methods are mainly for internal/developer use and their API might change without notice.

BaseRoutingClient._download(url, params=None, filename=None, data=None)

Download the URL with GET or POST and the chosen parameters.

Will call the _handle_requests_http_error() method if the response comes back with an HTTP code other than 200. Returns the response object if successful and filename is not given - if given it will save the response to the specified file and return None.

By default it will send a GET request - if data is given it will send a POST request.

  • url (str) – The URL to download from.

  • params (dict) – Additional URL parameters.

  • filename (str or file-like object) – String or file like object. Will download directly to the file. If specified, this function will return nothing.

  • data (dict, bytes, or file-like object) – If specified, a POST request will be sent with the data in the body of the request.


The response object assuming filename is None.

Return type


BaseRoutingClient._download_parallel(split, data_type, **kwargs)[source]
BaseRoutingClient._download_stations(split, **kwargs)[source]
BaseRoutingClient._download_waveforms(split, **kwargs)[source]

Filter requests based on including and excluding providers.


split (dict) – A dictionary containing the desired routing.


This assumes the same error code semantics as the base fdsnws web services.

Please overwrite this method in a child class if necessary.

Special Methods

BaseRoutingClient.__delattr__(name, /)

Implement delattr(self, name).


Default dir() implementation.

BaseRoutingClient.__eq__(value, /)

Return self==value.

BaseRoutingClient.__format__(format_spec, /)

Default object formatter.

BaseRoutingClient.__ge__(value, /)

Return self>=value.

BaseRoutingClient.__getattribute__(name, /)

Return getattr(self, name).

BaseRoutingClient.__gt__(value, /)

Return self>value.


Return hash(self).

BaseRoutingClient.__init__(debug=False, timeout=120, include_providers=None, exclude_providers=None, credentials=None)[source]
  • routing_type (str) – The type of router to initialize. For details see RoutingClient().

  • exclude_providers (str or list[str]) – Get no data from these providers. Can be the full HTTP address or one of the shortcuts ObsPy knows about.

  • include_providers (str or list[str]) – Get data only from these providers. Can be the full HTTP address of one of the shortcuts ObsPy knows about.

  • credentials (dict) – Credentials for the individual data centers as a dictionary that maps base url of FDSN web service to either username/password or EIDA token, e.g. credentials={ 'geofon.gfz-potsdam.de': {'eida_token': 'my_token_file.txt'}, 'service.iris.edu': {'user': 'me', 'password': 'my_pass'} 'EIDA_TOKEN': '/path/to/token.txt' } The root level 'EIDA_TOKEN' will be applied to all data centers that claim to support the /auth route and don’t have data center specific credentials. You can also use a URL mapping as for the normal FDSN client instead of the URL.


This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

BaseRoutingClient.__le__(value, /)

Return self<=value.

BaseRoutingClient.__lt__(value, /)

Return self<value.

BaseRoutingClient.__ne__(value, /)

Return self!=value.


Helper for pickle.

BaseRoutingClient.__reduce_ex__(protocol, /)

Helper for pickle.


Return repr(self).

BaseRoutingClient.__setattr__(name, value, /)

Implement setattr(self, name, value).


Size of object in memory, in bytes.


Return str(self).


Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).