Overview
HyperFlow provides a powerful Python coding option within HyperFlow's visual-flow programming environment through RestrictedPython. This enables users to write custom data transformations, create sophisticated tools for LLMs, implement data processing logic, and integrate with external systems—all while maintaining security and performance.
The Python environment is sandboxed for security, optimized with lazy-loaded data science libraries for better performance, and designed to integrate seamlessly with HyperFlow's visual programming model.
Supported Nodes
Python coding is supported in several key nodes, each designed for specific use cases:
1. Python Transform Node (Production Ready)
- Purpose: Advanced multi-input/output Python processing with flow control
- Display Name: "Python Transform"
- Input Variables:
input1, input2, input3 (all configurable data types)
- Output Variables:
output1, output2, output3 (independent routing to different downstream nodes)
- Flow Control:
exit variable (set to 1 or 2 to select exit branch)
- Key Features:
- 3 configurable inputs: Text, Number, JSON, Content, Segments, Knowledge, Configured Service, Any
- 3 independent outputs with same type options plus Prompt Template
- Dual process flow exits for conditional branching
- NameSpace objects for structured data with dotted attribute access (
config.section.value)
- Special globals:
keyValueStore, SafeSQLExecutor, NS/ns
- Use Cases: Complex data workflows, multi-modal processing, conditional routing, feedback loops, stateful processing
2. Data Transform Node (Current Version)
- Purpose: Template or Python-based data transformation
- Display Name: "Data transform"
- Input Variables:
input1, input2 (configurable data types)
- Output Variables:
output (single output, configurable type)
- Key Features:
- 2 configurable inputs: Text, Number, JSON, Content, Segments, Knowledge, Configured Service, Any
- Single configurable output: Text, Number, JSON, Content, Segments, Knowledge, Prompt Template, Configured Service
- Template mode for simple text substitution or Python mode for complex logic
- Special globals:
keyValueStore, SafeSQLExecutor, NS/ns
- DataValue classes available for type construction/inspection
- Use Cases: Data format conversion, calculations, API integration, simple transformations