Registry#

fetchez.registry#

A unified, dynamic registry system for discovering and loading Fetchez Modules, Hooks, Schemas, and other plugins.

copyright:
  1. 2010-2026 Regents of the University of Colorado

license:

MIT, see LICENSE for more details.

class fetchez.registry.PluginRegistry[source]#

Bases: object

Base class for dynamically discovering and registering plugins.

base_class: Optional[Type] = None#
builtin_pkg: str = ''#
entry_point_group: str = ''#
user_folder: str = ''#
classmethod get_registry()[source]#

Initialization of the class-level registry dictionary.

Return type:

Dict[str, Any]

classmethod load_builtins()[source]#

Recursively scan and load all built-in plugins.

classmethod load_user_plugins()[source]#

Scan local directories for user-provided plugins.

classmethod load_installed_plugins()[source]#

Load external pip-installed extensions via entry_points.

classmethod load_all()[source]#

Load all plugins: builtins, user plugins, and pip extensions.

classmethod load_fast()[source]#

Loads from the JSON cache for instant CLI menus. If cache is missing, falls back to the slow load_all().

classmethod save_cache()[source]#

Dumps the discovered registry to JSON.

classmethod get_info(mod_key)[source]#
Parameters:

mod_key (str)

Return type:

Dict[str, Any]

classmethod get_class(name)[source]#

Returns the class if cached, or lazily imports it on demand.

Parameters:

name (str)

classmethod load_module(name)#

Returns the class if cached, or lazily imports it on demand.

Parameters:

name (str)

classmethod list_all()[source]#
Return type:

Dict[str, Any]

classmethod search_modules(term)[source]#

Search modules by name, description, agency, or tags.

Parameters:

term (str)

class fetchez.registry.YamlRegistry[source]#

Bases: object

A registry for discovering and loading yaml configuration files (recipes and hook presets).

base_class: Optional[Type] = None#
builtin_pkg: str = ''#
entry_point_group: str = ''#
user_folder: str = ''#
classmethod get_registry()[source]#
Return type:

Dict[str, Any]

classmethod load_all()[source]#
classmethod load_fast()#
classmethod get_yaml(name)[source]#
Parameters:

name (str)

Return type:

Optional[Dict[str, Any]]

classmethod get_preset(name)#
Parameters:

name (str)

Return type:

Optional[Dict[str, Any]]

classmethod get_recipe(name)#
Parameters:

name (str)

Return type:

Optional[Dict[str, Any]]

class fetchez.registry.ModuleRegistry[source]#

Bases: PluginRegistry

base_class#

alias of FetchModule

builtin_pkg: str = 'fetchez.modules'#
entry_point_group: str = 'fetchez.modules'#
user_folder: str = 'modules'#
class fetchez.registry.HookRegistry[source]#

Bases: PluginRegistry

base_class#

alias of FetchHook

builtin_pkg: str = 'fetchez.hooks'#
entry_point_group: str = 'fetchez.hooks'#
user_folder: str = 'hooks'#
class fetchez.registry.SchemaRegistry[source]#

Bases: PluginRegistry

base_class#

alias of BaseSchema

builtin_pkg: str = 'fetchez.recipes.schemas'#
entry_point_group: str = 'fetchez.recipes.schemas'#
user_folder: str = 'recipes/schemas'#
classmethod apply_schema(config)[source]#

Looks for a schema in the config and applies its rules.

class fetchez.registry.ReaderRegistry[source]#

Bases: PluginRegistry

base_class#

alias of BaseReader

builtin_pkg: str = 'fetchez.streams.readers'#
entry_point_group: str = 'fetchez.streams.readers'#
user_folder: str = 'streams/readers'#
classmethod get_reader(src, term, **kwargs)[source]#
Parameters:

term (str)

classmethod get_reader_for_ext(ext)[source]#

Iterate through registered readers to find one that supports this extension.

Parameters:

ext (str)

classmethod get_reader_for_dtype(dtype)[source]#

Iterate through registered readers to find one that supports this dtype.

Parameters:

dtype (str)

class fetchez.registry.RecipeRegistry[source]#

Bases: YamlRegistry

A registry for discovering and loading YAML recipes.

builtin_pkg: str = 'fetchez.recipes'#
entry_point_group: str = 'fetchez.recipes'#
user_folder: str = 'recipes'#
class fetchez.registry.PresetRegistry[source]#

Bases: YamlRegistry

builtin_pkg: str = 'fetchez.hooks.presets'#
entry_point_group: str = 'fetchez.hooks.presets'#
user_folder: str = 'hooks/presets'#
classmethod hook_list_from_preset(preset_def)[source]#

Convert yaml definition to list of Hook Objects.

class fetchez.registry.BundleRegistry[source]#

Bases: YamlRegistry

A registry for discovering and loading Module Bundles (Data Packages).

builtin_pkg: str = 'fetchez.modules.bundles'#
entry_point_group: str = 'fetchez.modules.bundles'#
user_folder: str = 'modules/bundles'#
class fetchez.registry.ProfileRegistry[source]#

Bases: YamlRegistry

A registry for discovering and loading Format Profilesx.

builtin_pkg: str = 'fetchez.streams.profiles'#
entry_point_group: str = 'fetchez.streams.profiles'#
user_folder: str = 'streams/profiles'#