Create Parameter Types#
This how-to explains how to build custom Plugin Param Types in Dioptra.
Prerequisites#
Prepare Your Deployment - A deployment of Dioptra is required.
Prepare Your Deployment - A deployment of Dioptra is required.
Set Up the Python Client - Connect to the Python Client in a Jupyter Notebook.
Parameter Type Creation Workflow#
Follow these steps to create and register a new parameter type. You can perform these actions via the Graphical User Interface (GUI) or programmatically using the Python Client.
Step 1: Create the Parameter Type#
Register a parameter type for use in dioptra.
In the Dioptra GUI, navigate to the Plugin Parameters tab. Click Create.
Enter a name, description, select a group for the type, enter a structure (see Parameter Type Structures) if applicable, then click Confirm.
Client Method:
Use the client to create the parameter type.
- PluginParameterTypesCollectionClient.create(group_id: int, name: str, description: str | None = None, structure: dict[str, Any] | None = None) dioptra.client.plugin_parameter_types.T[source]#
Creates a plugin parameter type.
- Parameters
group_id – The id of the group that will own the plugin parameter type.
name – The name of the new plugin parameter type.
description – The description of the new plugin parameter type. Optional, defaults to None.
structure – Used to declare the internal structure of a plugin parameter type. If None, then the plugin parameter type is a simple type. Optional, defaults to None.
- Returns
The response from the Dioptra API.
See Also#
Parameter Types Explanation - Understand parameter types, structures, and their role in dioptra.
Parameter Types Reference - Reference page for parameter types.