A simplified interface to the obspy.clients.seedlink module.
EasySeedLinkClient class contained in this module provides a
more pythonic interface to the
obspy.clients.seedlink module with a
focus on ease of use, while minimizing unnecessary exposure of the protocol
A client object can easily be created using the
function, e.g. by providing a function to handle incoming data and a server
from obspy.clients.seedlink.easyseedlink import create_client # A function to handle incoming data def handle_data(trace): print('Received the following trace:') print(trace) print() # Create the client and pass the function as a callback client = create_client('geofon.gfz-potsdam.de', on_data=handle_data) client.select_stream('BW', 'MANZ', 'EHZ') client.run()
For advanced applications, subclassing the
allows for more flexibility. See the
documentation for an example.
For finer grained control of the SeedLink connection (e.g. custom
processing of individual SeedLink packets), using
SLClient directly might be the
As of now, single station mode is not supported. Neither are in-stream
The client is using the
class and hence inherits all of its limitations. For example, erroneous packets
are only logged, but otherwise ignored, with no possibility of handling them
explicitly. Keepalive handling is completely encapsulated inside the
connection object and cannot be easily influenced. Also, a
HELLO is always
sent to the server when connecting in order to determine the SeedLink protocol
Quickly create an EasySeedLinkClient instance.
An easy-to-use SeedLink client.
A base exception for all errors triggered explicitly by EasySeedLinkClient.