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:
| Enumeration | Description |
|---|---|
| JavaType | Java type mappings for cross-platform compatibility |
| Severity | Log and alert severity levels |
🏗️ Classes
The core building blocks of your applications — from data handling to workflow orchestration:
| Class | Purpose |
|---|---|
| Arith64 | 64-bit arithmetic operations |
| CompressionUtils | Data compression and decompression utilities |
| Connection | Manage external connections |
| Counter | Thread-safe counting mechanisms |
| DataDictionary | Structured data definitions and validation |
| DataDictionaryEntity | Individual entities within a data dictionary |
| DataDictionaryTypes | Type definitions for data dictionaries |
| DateTime | Date and time manipulation |
| Duration | Time duration calculations |
| Email composition and sending | |
| LocalDate | Locale-aware date handling |
| Message | Message creation and manipulation |
| MessageNode | Message node structure for hierarchical data |
| Metrics | Performance and operational metrics |
| OutputPort | Output port management for data flow |
| PackedMessage | Optimized message packing for efficiency |
| Processor | Base processor functionality |
| PythonProcessor | Base class for Python-based processors |
| Service | Service lifecycle management |
| Status | Status tracking and reporting |
| StatusCode | Standardized status codes |
| StatusRegistry | Centralized status management |
| Stream | Stream processing and handling |
| StringUtils | String manipulation utilities |
| Time | Time-specific operations |
| TimerService | Scheduling and timer-based execution |
| TimeZone | Time zone conversions and handling |
| Vendor | Third-party vendor integrations |
| Workflow | Workflow orchestration and control |
| ZoneOffset | Time zone offset calculations |
🔌 Interfaces
Contracts and type definitions for structured development:
| Interface | Used For |
|---|---|
| EmailMessage | Email message structure |
| Temporal | Time-based abstractions |
| TimerChoice | Timer choice configurations |
| TimerCron | Cron-based scheduling |
| TimerFixedRate | Fixed-rate timer setup |
| TimerOnce | One-time timer execution |
| TimerResponse | Timer callback responses |
📦 Global Variables
Instantly accessible objects available in your Python environment:
| Variable | Description |
|---|---|
| dataDictionary | Access the global data dictionary |
| message | Work with the current message |
| metrics | Record and retrieve metrics |
| processor | Access the current processor context |
| statusRegistry | Manage and query status registry |
| stream | Handle streaming data |
| workflow | Interact 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.