aiida.plugins package


Cached information for each plugin.

This module and the RegistryEntry class should be the sole location for the (implicit) definition of the registry format.

exception aiida.plugins.entry.InvalidPluginEntryError(msg='')[source]

Bases: exceptions.Exception


x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'aiida.plugins.entry'

list of weak references to the object (if defined)

class aiida.plugins.entry.RegistryEntry(**kwargs)[source]

Bases: object

Can be created from an entry in the online aiida plugin registry. An instance will be created and cached for each entry on update.

__dict__ = dict_proxy({'__module__': 'aiida.plugins.entry', 'entry_point_categories': <property object>, 'description': <property object>, 'package_name': <property object>, 'tags': <property object>, 'installed': <property object>, '__dict__': <attribute '__dict__' of 'RegistryEntry' objects>, 'extras_requirements': <property object>, 'install_requirements': <property object>, 'cli_apps': <property object>, '__weakref__': <attribute '__weakref__' of 'RegistryEntry' objects>, '__init__': <function __init__>, 'entry_points': <property object>, 'format_info': <function format_info>, 'gui_apps': <property object>, 'install': <function install>, 'author': <property object>, 'author_email': <property object>, 'version': <property object>, 'entry_points_raw': <property object>, 'load_setup_info': <function load_setup_info>, 'test_installed': <function test_installed>, 'home_url': <property object>, '__doc__': '\n Can be created from an entry in the online aiida plugin registry.\n An instance will be created and cached for each entry on update.\n '})

stores registry entry keys and loads the setup_info from the url given in plugin_info

__module__ = 'aiida.plugins.entry'

list of weak references to the object (if defined)


A list of cli apps installed by this plugin


A list of categories for which this plugin exposes entry points


A dict of entry point names by category


The full entry point spec in setuptools.setup() format


format and return a datastructure containing all known information about the plugin

  • format – str, one of [tabulate | dict] tabulate: use tabulate to create and return a table of properties as a string dict: create a dict of properties
  • as_str – bool format=’dict’ and as_str=True: return a pretty printed string version of the dict format=’dict’ and as_str=False: return a dictionary format=’tabulate’: as_str is ignored

A list of GUI apps installed by this plugin


Call on pip to install the package if not yet installed


Load setup kwargs from the link in the registry


The name used to import the package


Return wether the plugin is installed

First, this checks wether the package_name can be imported. If not, we know that at least no new style plugin with that name is installed.

Secondly, tests wether all the entry points are currently found by the plugin loader. If not, it is considered not installed.

potential failures:
  • loading of the entry points is not tested
  • not properly uninstalled plugins might show up as
    installed if the entry points are still around.
  • it does not distinguish between not installed and
    an old version is installed

The version of the plugin package

Utilities for high-level querying of available plugins.

These tools read information from the cached registry. The plugin registry (in cache) is expected to be a dict where the keys are base entry point names of plugins (unique for registered plugins)

example registry:

registry = {
    'quantumespresso': {
        'name': 'aiida-quantumespresso',
        'package_name': 'aiida_quantumespresso',
        'pip_url': 'git+https://...',
        'other_key': 'other_value'
    'vasp': {
        'name': aiida-vasp',
        'package_name': 'aiida_vasp',
        '...': '...'

returns the pickled RegistryEntry object for a given plugin_key, ranking=False)[source]

returns a list of RegistryEntry objects for all matches[source]

find the plugin with the base entry point name of the given typestring

Returns:dict with plugin keys if found, None if not found[source]

return an iterator over the plugin entrypoint base strings

Utilities for low-level querying of plugins.

Interface for operations that have to connect the registry online and that operate on the cache folder.


delete any plugin info files that do not correspond to a registry entry


load the registry from the local cache if the local cache is not readable, create or update it


loads the registry file and returns the list of plugins


check if the registry cache exists

Return bool:True if exists, False if not

return the name of the registry cache file


return the path to the cache file


return true if the registry cache file can be opened


return the url for the plugins.json file

aiida.plugins.registry.update(with_info=True, registry_err_handler=None, info_err_handler=None)[source]

Load the registry from its online location and pickle it.

Creates the cache file if necessary. By default updates the entry details cache for each entry as well.

  • with_info – default: True, update info cache for each entry as well
  • registry_err_handler – callable(exception) -> dict. Must either raise or return a registry dict
  • info_err_handler – callable(exception, plugin, data) -> None. Can raise or just print an error / warning.

If none of the error handlers are given, the function will stop execution if any broken links are encountered.

aiida.plugins.registry.update_info(registry=None, errorhandler=None)[source]

iterate through plugins, download setup info and return as dict

utilities for:

  • managing the registry cache folder
  • downloading json files
  • pickling to the registry cache folder
aiida.plugins.utils.load_json_from_url(url, errorhandler=None)[source]

downloads a json file and returns the corresponding python dict

aiida.plugins.utils.pickle_to_registry_cache_folder(obj, fname)[source]

pickles a python object to the registry cache folder


return True if the cache folder exists, False if not


return the name of the subfolder of aiida_dir where registry caches are stored.


return the fully resolved path to the cache folder


creates the registry cache folder if it does not exist


looks for fname in the registry cache folder and tries to unpickle from it