xpublish.plugins.hooks.PluginSpec#
- pydantic model xpublish.plugins.hooks.PluginSpec[source]#
Plugin extension points.
Plugins do not need to implement all of the methods defined here, instead they implement
Show JSON schema
{ "title": "PluginSpec", "description": "Plugin extension points.\n\nPlugins do not need to implement all of the methods defined here,\ninstead they implement", "type": "object", "properties": { "name": { "title": "Name", "description": "Fallback name of plugin", "type": "string" } }, "required": [ "name" ] }
- Fields:
- app_router(deps)[source]#
Create an app (top-level) router for the plugin.
Implementations should return an APIRouter, and define app_router_prefix, and app_router_tags on the class, and use those to initialize the router.
- Return type:
APIRouter
- dataset_router(deps)[source]#
Create a dataset router for the plugin.
Implementations should return an APIRouter, and define dataset_router_prefix, and dataset_router_tags on the class, and use those to initialize the router.
- Return type:
APIRouter
- get_dataset(dataset_id)[source]#
Return a dataset by requested dataset_id.
If the plugin does not have the dataset, return None