Skip to main content
Configurable plugins allow operators and users to tune behavior directly from the Noxus UI without redeploying code.

Defining Configuration

Use Pydantic models to define your plugin’s configuration schema. This schema is used to automatically generate the configuration UI in the platform.
from pydantic import Field
from noxus_sdk.plugins import PluginConfiguration

class WeatherPluginConfig(PluginConfiguration):
    # This generates a text input with a default and description
    units: str = Field(default="metric", description="Temperature units (metric/imperial)")
    
    # This generates a numeric slider/input with bounds
    api_timeout: int = Field(default=30, ge=1, le=120)
    
    # This generates a toggle switch
    enable_caching: bool = Field(default=True, title="Enable Cache")

Accessing Configuration in Nodes

The configuration is automatically injected into your node’s execution context.
class GetWeatherNode(BaseNode):
    def execute(self, inputs, context):
        # Access the plugin-level configuration
        units = self.plugin.config.units
        timeout = self.plugin.config.api_timeout
        
        # Use the config in your logic
        return {"temp": 22 if units == "metric" else 72}

Runtime Safety

  • Bounds Enforcement: Use ge (greater than or equal) and le (less than or equal) to prevent resource exhaustion.
  • Input Sanitization: Always sanitize string and list inputs before using them in external calls.
  • Redaction: Sensitive fields should be marked so they are redacted in platform logs.

Publishing & Versioning

Learn how to ship configuration changes safely over time.