ESB, SOA, API and Cloud Integrations in Python.
Zato is a Python-based, open-source platform that lets you automate, integrate and orchestrate business systems, APIs, workflows as well as hardware assets in industries such as airports, defense, health care, telecommunications, financial services, government and more.
# -*- coding: utf-8 -*-
# Zato
from zato.server.service import Service
class SampleServiceREST(Service):
""" A sample service that invokes a REST API endpoint.
"""
def handle(self):
# Request to send ..
request = {'user_id':123, 'balance':1357, 'currency':'USD'}
# .. get a connection to our previously created REST endpoint ..
conn = self.out.rest['Billing'].conn
# .. invoke it ..
response = conn.post(self.cid, request)
#
# .. here, a real service would process the response ..
#
# .. but in this sample, we simply return it to our caller.
self.response.payload = response.data
Visit https://zato.io for the details, including: