Fetchez Hooks
Hooks allow you to intercept, filter, and modify data before, during or after the fetch process.
fetchez.hooks.__init__
This init file also holds the FetchHook super class
- copyright:
2010-2026 Regents of the University of Colorado
- license:
MIT, see LICENSE for more details.
-
class fetchez.hooks.FetchHook(stage=None, **kwargs)[source]
Bases: object
Base class for all Fetchez Hooks.
-
__init__(stage=None, **kwargs)[source]
-
get_stream_type(entry)[source]
Retrieve the stream type.
-
has_stream(entry)[source]
Check if an entry contains an active data stream.
-
is_list_stream(entry)[source]
Check if the current stream is a list-stream.
-
is_point_stream(entry)[source]
Check if the current stream is a point-stream.
-
is_raster_stream(entry)[source]
Check if the current stream is a raster-stream.
-
meta_category = 'uncategorized'
-
meta_desc = 'Does something.'
-
meta_stage = 'file'
-
name = 'base-hook'
-
run(entries)[source]
Execute the hook.
- Parameters:
entries – A list of (module, entry) tuples representing the active pipeline.
- Returns:
Modified entries list.
-
teardown()[source]
Cleanup.
Called once after all processing is complete.
Override this to close files, finalize grids, or print summaries.