Initial commit: Python Example Pack for Attune
Includes: - 3 Python actions (hello, http_example, read_counter) - 1 counter trigger type - 1 counter sensor (Python, keystore-backed, per-rule state) - 1 example rule (count_and_log) - requirements.txt with requests and pika - README with full usage documentation
This commit is contained in:
45
actions/hello.yaml
Normal file
45
actions/hello.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
# Hello Action
|
||||
# Simple Python action that returns "Hello, Python"
|
||||
|
||||
ref: python_example.hello
|
||||
label: "Hello Python"
|
||||
description: "A simple Python action that returns a greeting message"
|
||||
enabled: true
|
||||
|
||||
# Runner type determines how the action is executed
|
||||
runner_type: python
|
||||
|
||||
# Entry point is the Python script to execute
|
||||
entry_point: hello.py
|
||||
|
||||
# Parameter delivery: stdin for secure parameter passing
|
||||
parameter_delivery: stdin
|
||||
parameter_format: json
|
||||
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: "Optional name to include in greeting"
|
||||
default: "Python"
|
||||
|
||||
# Output schema
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
description: "The greeting message"
|
||||
required:
|
||||
- message
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
- python
|
||||
- example
|
||||
- greeting
|
||||
Reference in New Issue
Block a user