arelle.plugin_system.entry_point_ref

See COPYRIGHT.md for copyright information.

Module Contents

Classes

API

class arelle.plugin_system.entry_point_ref.EntryPointRef
aliases: set[str]

None

entryPoint: importlib.metadata.EntryPoint | None

None

moduleFilename: str | None

None

moduleInfo: dict[str, Any] | None

None

createModuleInfo(plugin_manager: arelle.plugin_system._plugin_manager.PluginManager | None = None) dict[str, Any] | None

Creates a module information dictionary from the entry point ref.

Parameters:

plugin_manager – PluginManager instance. If not provided, uses the global PluginManager instance.

Returns:

A module information dictionary

static fromEntryPoint(entryPoint: importlib.metadata.EntryPoint, plugin_manager: arelle.plugin_system._plugin_manager.PluginManager | None = None) arelle.plugin_system.entry_point_ref.EntryPointRef | None

Given an entry point, retrieves the subset of information from pluginInfo necessary to determine if the entry point should be imported as a plugin.

Parameters:
  • entryPoint

  • plugin_manager – PluginManager instance. If not provided, uses the global PluginManager instance.

Returns:

static fromFilepath(filepath: str, entryPoint: importlib.metadata.EntryPoint | None = None, plugin_manager: arelle.plugin_system._plugin_manager.PluginManager | None = None) arelle.plugin_system.entry_point_ref.EntryPointRef | None

Given a filepath, retrieves a subset of information from pluginInfo necessary to determine if the entry point should be imported as a plugin.

Parameters:
  • filepath – Path to plugin, can be a directory or .py filepath

  • entryPoint – Optional entry point information to include in aliases/moduleInfo

  • plugin_manager – PluginManager instance. If not provided, uses the global PluginManager instance.

Returns:

static discoverAll(plugin_manager: arelle.plugin_system._plugin_manager.PluginManager | None = None) list[arelle.plugin_system.entry_point_ref.EntryPointRef]

Retrieve all plugin entry points, cached on first run.

Parameters:

plugin_manager – PluginManager instance. If not provided, uses the global PluginManager instance.

Returns:

List of all discovered entry points.

static get(search: str, plugin_manager: arelle.plugin_system._plugin_manager.PluginManager | None = None) arelle.plugin_system.entry_point_ref.EntryPointRef | None

Retrieve an entry point ref with a matching name or alias. May return None of no matches are found. Throws an exception if multiple entry point refs match the search term.

Parameters:
  • search – Only retrieve entry point matching the given search text.

  • plugin_manager – PluginManager instance. If not provided, uses the global PluginManager instance.

Returns:

Matching entry point ref, if found.

static search(search: str, plugin_manager: arelle.plugin_system._plugin_manager.PluginManager | None = None) list[arelle.plugin_system.entry_point_ref.EntryPointRef] | None

Retrieve entry point module information matching provided search text. A map of aliases to matching entry points is cached on the first run.

Parameters:
  • search – Only retrieve entry points matching the given search text.

  • plugin_manager – PluginManager instance. If not provided, uses the global PluginManager instance.

Returns:

List of matching module infos.