obspy.core.event.resourceid.ResourceIdentifier.register_get_object_hook

classmethod ResourceIdentifier.register_get_object_hook(get_object_callable)[source]

Register a callable to return referred object if normal means fail.

This is useful, for example, to allow the resource_identifier to create objects from entries in a database that do not yet have an in-memory representation.

Parameters:

get_object_callable (callable) – Any callable that takes a resource id string and returns an object.