Welcome to microdrop-plugin-template’s documentation!

Template for a Microdrop plugin.


Install using pip:

pip install microdrop-plugin-template

Create a new plugin

Initialize new plugin from template:

python -m microdrop_plugin_template.create_plugin <output directory>

For full usage details, run:

python -m microdrop_plugin_template.create_plugin --help

Copy hook scripts to existing plugin directory

If the hook scripts copied during the initialization of a new plugin have not been modified, it may be beneficial to update the hook scripts to match the ones in the latest version of the microdrop-plugin-template plugin template.

To copy the latest version of the hook scripts from the microdrop-plugin-template plugin template to an existing plugin directory, run:

python -m microdrop_plugin_template.init_hooks <plugin directory>

For full usage details, run:

python -m microdrop_plugin_template.init_hooks --help


Documentation is available online here .


Project is hosted on GitHub .

API reference

microdrop_plugin_template.create_plugin.create_plugin(output_directory, overwrite=False, init_git=True)[source]
  • output_directory (str) – Output directory path. Directory name must be a valid Python module name.
  • overwrite (bool, optional) – Overwrite existing output directory.

Output directory path.

Return type:


  • ValueError – If output_directory name is not a valid Python module name.
  • IOError – If output_directory exists and overwrite is False.

Parses arguments, returns (options, args).

microdrop_plugin_template.init_hooks.init_hooks(plugin_directory, overwrite=False)[source]

Copy default hook scripts to specified plugin.

Prompt to overwrite a hook script if it already exists (unless overwrite==True).

  • plugin_directory (str) – Microdrop plugin directory
  • overwrite (bool) – If True, overwrite existing file with same name as output file.

Parses arguments, returns (options, args).

Indices and tables