Plugin Templates

Pymemri offers a range of plugin templates to set up testing, docker and CI for you. This way, you can focus on building your plugin, and be sure it works within the Memri ecosystem.

All plugins are hosted on our GitLab. In order to make your own plugin from a template,

  1. Create an account on GitLab
  2. Create a public blank repository
  3. Clone the repository
  4. run the plugin_from_template CLI inside the repository folder.

The CLI will infer most settings for you from your git account and repository name, only a template name and optional description are required.

plugin_from_template --template classifier_plugin --description "My Classifier Plugin"

To make sure all settings are correct, you can inspect metadata.json, which holds all information like your plugin name, and python package name.

You can list the available templates with. All plugin templates are hosted here.

plugin_from_template --list

The CLI has options to customize the plugin name, package name and other aspects of your plugin. For advanced use, run:

plugin_from_template --help

Plugin Template CLI

With the plugin_from_template CLI, you can easily create a plugin where all CI pipelines, docker files, and test setups are configured for you. Multiple templates are available, to see the complete list use:

plugin_from_template --list_templates


plugin_from_template(list_templates:"List available plugin templates"=False, user:"Your Gitlab username"=None, repo_url:"The url of your empty Gitlab plugin repository"=None, plugin_name:"Display name of your plugin"=None, template_name:"Name of the template, use list_templates to see all available options"='basic', package_name:"Name of your plugin python package"=None, description:"Description of your plugin"=None, target_dir:"Directory to output the formatted template"='.', install_requires:"Extra packages to install, provided as comma separated, e.g. pymemri,requests"='')

CLI that downloads and formats a plugin template according to the arguments, and local git repository.
    list_templates (Param, optional): If True, only list available templates. Defaults to False.
    user (Param, optional): Your GitLab username. Defaults to None.
    repo_url (Param, optional): The url of your gitlab plugin repository. Defaults to None.
    plugin_name (Param, optional): The name of your plugin. Defaults to None.
    template_name (Param, optional): The name of the template used. To list all options, see `list_templates`.
        Defaults to "basic".
    package_name (Param, optional): The name of the python package of your plugin. Inferred if left blank. Defaults to None.
    description (Param, optional): An optional plugin description. Defaults to None.
    target_dir (Param, optional): Directory where the plugin template is generated. Defaults to ".".
!plugin_from_template --list_templates
Available templates: