Service
id: py-Service
Service
Services in layline.io provide integrations with external systems — databases, message queues, HTTP APIs, email servers, and more. You configure services through Service Assets in the UI, then access them in Python via the services object.
Available service types include JDBC, HTTP, Email, Cassandra, Hazelcast, Aerospike, and more.
At a Glance
# Access a configured service
db_service = services.MyDBService
email_service = services.EmailService
# Open a connection (for connection-based services like JDBC)
connection = db_service.openConnection()
# Call service functions
result = connection.MyQuery(message)
Accessing Services
Services linked to your Python Asset are available through the services object using their configured names.
# In your Python Asset configuration, you linked:
# - MyDBService (JDBC Service)
# - EmailService (Email Service)
db = services.MyDBService
mail = services.EmailService