Skip to content

Python Module Plugin

NorFab Custom Service Plugin Python Module Tutorial¤

Step 1: Set Up Your Development Environment¤

To create custom service plugins for Norfab, you need to set up your development environment. Ensure that you have Python installed and Norfab installed.

Step 2: Create a Plugin Directory¤

Create a directory for your custom plugin within the Norfab project. This directory will contain all the necessary files for your plugin.

mkdir -p /path/to/norfab/plugins/my_custom_plugin

Step 3: Implement the Plugin¤

Create a Python file for your plugin and implement the necessary functionality. Here is an example of a simple custom plugin:


Step 4: Register the Plugin¤

Register your custom plugin with Norfab by updating entrypoint in pyproject file.


Step 5: Configure the Plugin¤

Configure your custom plugin by adding any necessary parameters to the Norfab inventory.


Step 6: Use the Plugin¤

Use your custom plugin in your Norfab tasks and workflows. Here is an example of how to call the custom plugin from a Norfab task: