Skip to content

# hooks

## `xsdata.utils.hooks`

### `load_entry_points(name)`

Load the plugins for the given hook name.

Source code in `xsdata/utils/hooks.py`

     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14

    def load_entry_points(name: str) -> None:
        """Load the plugins for the given hook name."""
        entry_points = metadata.entry_points()

        if hasattr(entry_points, "select"):
            plugins = entry_points.select(group=name)  # type: ignore
        else:
            plugins = entry_points.get(name, [])  # type: ignore

        for plugin in plugins:
            plugin.load()