Skip to main content

Core nodes for Flowire workflow automation

Project description

Flowire Core Nodes

PyPI version

Core nodes for Flowire workflow automation. This package provides essential nodes for building workflows.

Installation

cd flowire-app/backend
uv pip install fw-nodes-core

Then enable the package in your .env file:

# .env
INSTALLED_NODE_PACKAGES=fw-nodes-core

Included Nodes

Flow Control

Node Description
WorkflowTrigger Entry point for workflows, receives trigger data
Condition Conditional branching based on expressions
ForEach Loop over arrays, executing sub-workflows
CallFlow Execute another workflow as a sub-routine
Delay Pause execution for a specified duration
Return Return data from a workflow

Data Manipulation

Node Description
SetValues Set or transform values with Jinja2 templates
Strip Strip whitespace from strings
GenerateJSONL Generate JSONL formatted output

HTTP & Web

Node Description
HTTPRequest Make HTTP requests (GET, POST, PUT, DELETE, etc.)
HTMLParse Parse HTML with CSS/XPath selectors
Webhook Receive external HTTP requests
WebhookResponse Send response to webhook caller

Cloud Services

Node Description
S3Upload Upload files to AWS S3

Visual/Organization

Node Description
Comment Add notes and documentation to workflows
Group Visually group related nodes

Usage Examples

HTTP Request

# Node configuration in workflow:
{
    "method": "POST",
    "url": "https://api.example.com/data",
    "headers": {"Authorization": "Bearer {{project.api-key-uuid}}"},
    "body": {"name": "{{trigger.name}}"}
}

Condition Node

# Branch based on HTTP response status
{
    "condition": "{{http-request.status_code}} == 200"
}
# Outputs: "true" or "false" handles

ForEach Loop

# Process each item in an array
{
    "items": "{{http-request.data.results}}",
    "workflow_id": "process-item-workflow"
}

HTMLParse

# Extract data from HTML
{
    "html": "{{http-request.body}}",
    "selector": "div.product",
    "extract": "text"
}

Creating Custom Nodes

Use this package as a reference for creating your own node packages:

  1. Create a new package depending on flowire-sdk:
# pyproject.toml
[project]
name = "my-custom-nodes"
dependencies = ["flowire-sdk>=0.1.0"]

[project.entry-points."flowire.nodes"]
my_node = "my_custom_nodes.nodes:MyNode"
  1. Implement your node:
from pydantic import BaseModel, Field
from flowire_sdk import BaseNode, BaseNodeOutput, NodeMetadata

class MyInput(BaseModel):
    value: str = Field(..., description="Input value")

class MyOutput(BaseNodeOutput):
    result: str = Field(..., description="Processed result")

class MyNode(BaseNode):
    input_schema = MyInput
    output_schema = MyOutput
    metadata = NodeMetadata(
        name="My Node",
        description="Does something useful",
        category="custom",
    )

    async def execute_logic(self, validated_inputs, context):
        return MyOutput(result=f"Processed: {validated_inputs['value']}")
  1. Add to Flowire:
# Install the package
cd flowire-app/backend
uv pip install my-custom-nodes

# Enable in .env (comma-separated list)
INSTALLED_NODE_PACKAGES=fw-nodes-core,my-custom-nodes

Development

# Install with dev dependencies
just install

# Run linter
just lint

# Auto-fix lint issues
just lint-fix

# Format code
just format

# Run tests
just test

# Run all checks
just check

Testing Nodes

The test suite demonstrates how to test nodes in isolation using MockExecutionContext:

import pytest
from fw_nodes_core.nodes.set_values import SetValuesNode

@pytest.fixture
def node_execution_context():
    from tests.conftest import MockExecutionContext
    return MockExecutionContext(
        workflow_id="wf_123",
        execution_id="exec_456",
        node_id="node_789",
        project_id="proj_abc",
    )

@pytest.mark.asyncio
async def test_set_values_node(node_execution_context):
    node = SetValuesNode()
    result = await node.execute(
        {"values": [{"key": "greeting", "value": "hello"}]},
        node_execution_context
    )
    assert result["greeting"] == "hello"

Project Structure

fw-nodes-core/
├── fw_nodes_core/
│   ├── __init__.py
│   └── nodes/
│       ├── __init__.py
│       ├── http_request.py
│       ├── condition.py
│       ├── delay.py
│       ├── set_values.py
│       ├── trigger.py
│       ├── call_flow.py
│       ├── for_each.py
│       ├── html_parse.py
│       ├── strip.py
│       ├── s3_upload.py
│       ├── comment.py
│       ├── group.py
│       ├── generate_jsonl.py
│       ├── return_node.py
│       ├── webhook.py
│       └── webhook_response.py
├── tests/
│   ├── conftest.py          # MockExecutionContext fixture
│   └── test_*.py            # Node tests
├── pyproject.toml
├── justfile
└── README.md

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fw_nodes_core-0.0.1a5.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fw_nodes_core-0.0.1a5-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file fw_nodes_core-0.0.1a5.tar.gz.

File metadata

  • Download URL: fw_nodes_core-0.0.1a5.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fw_nodes_core-0.0.1a5.tar.gz
Algorithm Hash digest
SHA256 855ab127bdfce6b90aec372b415c9e2b6b2aeaad04a7fbc86da2c42a1b07b0de
MD5 5b802ba3a085526d3ea309d004946bd5
BLAKE2b-256 465d6ad56b89f38bec0ef5f30140e013ade9f919252d12226d2ac6975fac4729

See more details on using hashes here.

File details

Details for the file fw_nodes_core-0.0.1a5-py3-none-any.whl.

File metadata

  • Download URL: fw_nodes_core-0.0.1a5-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fw_nodes_core-0.0.1a5-py3-none-any.whl
Algorithm Hash digest
SHA256 6ff264a07c762d5a97bb0f9881a77d6a3914702de1e0ed90e15967cdb32998b4
MD5 46e38e6c3bb5e655f8c0f2db1eac9588
BLAKE2b-256 61585949359344b8abf8d62bc7f01c07399ad04e8eeed03e064aaa877bccb663

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page