obspy.clients.seishub.client.Client

class Client(base_url='http://teide.geophysik.uni-muenchen.de:8080', user='admin', password='admin', timeout=10, debug=False, retries=3)[source]

Bases: object

DEPRECATED – SeisHub database client is deprecated

SeisHub database request Client class.

The following classes are automatically linked with initialization. Follow the links in “Linked Class” for more information. They register via the name listed in “Entry Point”.

Entry Point

Linked Class

Client.waveform

_WaveformMapperClient

Client.station

_StationMapperClient

Client.event

_EventMapperClient

Attributes

waveform

A obspy.clients.seishub.client._WaveformMapperClient instance

station

A obspy.clients.seishub.client._StationMapperClient instance

event

An obspy.clients.seishub.client._EventMapperClient instance

Public Methods

ping

Ping the SeisHub server.

test_auth

Test if authentication information is valid.

Private Methods

Warning

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

Client._fetch(url, *args, **kwargs)[source]
Client._http_request(url, method, xml_string=None, headers={})[source]

Send a HTTP request via urllib2.

Parameters
  • url (str) – Complete URL of resource

  • method (str) – HTTP method of request, e.g. “PUT”

  • headers (dict) – Header information for request, e.g. {‘User-Agent’: “obspyck”}

  • xml_string (str) – XML for a send request (PUT/POST)

Client._objectify(url, *args, **kwargs)[source]

Special Methods

Client.__delattr__(name, /)

Implement delattr(self, name).

Client.__dir__()

Default dir() implementation.

Client.__eq__(value, /)

Return self==value.

Client.__format__(format_spec, /)

Default object formatter.

Client.__ge__(value, /)

Return self>=value.

Client.__getattribute__(name, /)

Return getattr(self, name).

Client.__gt__(value, /)

Return self>value.

Client.__hash__()

Return hash(self).

Client.__init__(base_url='http://teide.geophysik.uni-muenchen.de:8080', user='admin', password='admin', timeout=10, debug=False, retries=3)[source]

DEPRECATED – SeisHub database client is deprecated

Initializes the SeisHub Web service client.

Parameters
  • base_url (str, optional) – SeisHub connection string. Defaults to ‘http://teide.geophysik.uni-muenchen.de:8080’.

  • user (str, optional) – The user name used for identification with the Web service. Defaults to 'admin'.

  • password (str, optional) – A password used for authentication with the Web service. Defaults to 'admin'.

  • timeout (int, optional) – Seconds before a connection timeout is raised (default is 10 seconds).

  • debug (bool, optional) – Enables verbose output.

  • retries (int) – Number of retries for failing requests.

Client.__init_subclass__()

This method is called when a class is subclassed.

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

Client.__le__(value, /)

Return self<=value.

Client.__lt__(value, /)

Return self<value.

Client.__ne__(value, /)

Return self!=value.

Client.__new__(**kwargs)
Client.__reduce__()

Helper for pickle.

Client.__reduce_ex__(protocol, /)

Helper for pickle.

Client.__repr__()

Return repr(self).

Client.__setattr__(name, value, /)

Implement setattr(self, name, value).

Client.__sizeof__()

Size of object in memory, in bytes.

Client.__str__()

Return str(self).

Client.__subclasshook__()

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).