Enable seamless data exchange between events across Python, Node.js, and Bash scripts with standardized functions and API integration.
The Unified Input/Output System provides a consistent way to pass data between events and workflows, regardless of the programming language. This enables powerful data processing pipelines and external system integration.
Works consistently across Python, Node.js, and Bash scripts
Accept input data via REST API endpoints for external integrations
Automatic data flow between connected workflow nodes
The cronium object is automatically injected into every script. No imports, requires, or sourcing needed - just start using cronium.input() and cronium.output() immediately.
# cronium is automatically available - no imports needed!
# Access input data directly
input_data = cronium.input()
print(f"Received: {input_data}")
# Access specific fields
user_id = input_data.get('user_id', 'unknown')
action = input_data.get('action', 'default')
# Assign to new variable
new_input = cronium.input()cronium object available globallycronium object available globallycronium_input() and cronium_output() functions availableSet output data using the simple cronium.output() function. This data can be accessed by subsequent workflow nodes or retrieved via API. The cronium object is automatically available in all scripts.
# cronium is automatically available - no imports needed!
# Create output data
output_data = {
"success": True,
"message": "Processing completed",
"results": {
"processed_items": 42,
"total_time": "2.5s"
},
"next_action": "send_notification"
}
# Set output for next workflow node
cronium.output(output_data)Use standard logging methods in each language. The cronium object is automatically available if you need to access input data within your logging.
# Use standard Python print for logging
print("Starting data processing...")
print(f"Processing {len(items)} items")
print("Data processing completed successfully")
# Access input if needed (cronium automatically available)
input_data = cronium.input()
if input_data.get('verbose'):
print(f"Input received: {input_data}")Access event metadata using the cronium.event() function. This returns information about the current event such as its ID, name, type, server details, and execution statistics.
# cronium is automatically available - no imports needed!
# Access event metadata
event_data = cronium.event()
print(f"Event ID: {event_data.get('id')}")
print(f"Event Name: {event_data.get('name')}")
print(f"Event Type: {event_data.get('type')}")
# Use event info in processing
if event_data.get('type') == 'PYTHON':
print("Running Python script")
# Check server information
server = event_data.get('server')
if server:
print(f"Running on server: {server.get('name')}")Execute events with custom input data using the REST API endpoint
POST /api/events/{event_id}/execute
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN
{
"input": {
"user_id": 123,
"action": "process_data",
"data": {
"items": ["item1", "item2", "item3"],
"priority": "high"
},
"metadata": {
"request_id": "req_12345",
"timestamp": "2025-06-06T22:00:00Z"
}
}
}import requests
# Execute event with input data
response = requests.post(
'https://your-cronium-instance.com/api/events/42/execute',
headers={
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
json={
"input": {
"user_id": 123,
"action": "process_data",
"data": {"items": ["item1", "item2"]}
}
}
)
result = response.json()
print(f"Execution result: {result}")# cronium is automatically available - no imports needed!
# Access input
user_data = cronium.input()
print(f"Processing for user: {user_data.get('name', 'unknown')}")
# Access event metadata
event_data = cronium.event()
print(f"Running event: {event_data.get('name')} (ID: {event_data.get('id')})")
# Set output
cronium.output({"result": "success", "processed": True})The cronium object is automatically available in containerized execution. No imports needed.
Check if input is being passed via API or if workflow connections are properly configured.
Validate JSON structure before calling cronium.output(). Use JSON validators or linters.
cronium.input to verify data structure