Skip to main content

Python API Reference

Welcome to the Layline Python API — your complete toolkit for building powerful workflow processors, services, and integrations in Python.

Whether you're manipulating data, managing streams, sending emails, or orchestrating complex workflows, this API provides everything you need to write clean, efficient Python code within the Layline platform.


What's Inside

🔢 Enumerations

Define constants and typed values with these enumerations:

EnumerationDescription
JavaTypeJava type mappings for cross-platform compatibility
SeverityLog and alert severity levels

🏗️ Classes

The core building blocks of your applications — from data handling to workflow orchestration:

ClassPurpose
Arith6464-bit arithmetic operations
CompressionUtilsData compression and decompression utilities
ConnectionManage external connections
CounterThread-safe counting mechanisms
DataDictionaryStructured data definitions and validation
DataDictionaryEntityIndividual entities within a data dictionary
DataDictionaryTypesType definitions for data dictionaries
DateTimeDate and time manipulation
DurationTime duration calculations
EmailEmail composition and sending
LocalDateLocale-aware date handling
MessageMessage creation and manipulation
MessageNodeMessage node structure for hierarchical data
MetricsPerformance and operational metrics
OutputPortOutput port management for data flow
PackedMessageOptimized message packing for efficiency
ProcessorBase processor functionality
PythonProcessorBase class for Python-based processors
ServiceService lifecycle management
StatusStatus tracking and reporting
StatusCodeStandardized status codes
StatusRegistryCentralized status management
StreamStream processing and handling
StringUtilsString manipulation utilities
TimeTime-specific operations
TimerServiceScheduling and timer-based execution
TimeZoneTime zone conversions and handling
VendorThird-party vendor integrations
WorkflowWorkflow orchestration and control
ZoneOffsetTime zone offset calculations

🔌 Interfaces

Contracts and type definitions for structured development:

InterfaceUsed For
EmailMessageEmail message structure
TemporalTime-based abstractions
TimerChoiceTimer choice configurations
TimerCronCron-based scheduling
TimerFixedRateFixed-rate timer setup
TimerOnceOne-time timer execution
TimerResponseTimer callback responses

📦 Global Variables

Instantly accessible objects available in your Python environment:

VariableDescription
dataDictionaryAccess the global data dictionary
messageWork with the current message
metricsRecord and retrieve metrics
processorAccess the current processor context
statusRegistryManage and query status registry
streamHandle streaming data
workflowInteract with the active workflow

Quick Tips

  • New to Layline? Start with the Workflow and Message classes — they're the heart of most integrations.
  • Building a Python processor? Use PythonProcessor as your base class.
  • Working with schedules? Check out TimerService and the timer interfaces for flexible scheduling options.
  • Need to track performance? The Metrics class and metrics variable make it easy to monitor your code.

Explore each section above for detailed documentation, code examples, and best practices.