Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 23354

Zato Blog: How to integrate API systems in Python

$
0
0

With the immenent release of Zato 3.2, we are happy today to announce the availability of a new API integrations tutorial. Let's quickly check what it offers.

The tutorial is completely new and by following it, you will learn all of:

  • What is Zato and how it can be used as an API integrations platform and backend application server

  • How to think in terms of reusable API services

  • Zato installation under several platforms, including Linux distrubutions, Docker and Vagrant

  • Using PyCharm, Visual Studio Code and other IDEs with Zato

  • Developing Zato services and using its Dashboard for configuration

  • How to integrate with external systems, using REST and AMQP as example technologies

  • How to automate deployments

  • How to conduct automated API tests in plain English, without any programming

In short, after you complete it, you will acquire the core of what is needed to use Python to integrate complex API and backend systems.

Zato tutorial
# -*- coding: utf-8 -*-
# zato: ide-deploy=True
# Zato
fromzato.server.serviceimportServiceclassGetUserDetails(Service):""" Returns details of a user by the person's ID.
    """name='api.user.get-details'defhandle(self):# For later use
user_name=self.request.payload['user_name']# Get data from CRM ..
crm_data=self.invoke_crm(user_name)# .. extract the CRM information we are interested in ..
user_type=crm_data['UserType']account_no=crm_data['AccountNumber']# .. get data from Payments ..
payments_data=self.invoke_payments(user_name,account_no)# .. extract the CRM data we are interested in ..
account_balance=payments_data['ACC_BALANCE']# .. optionally, notify the fraud detection system ..
ifself.should_notify_fraud_detection(user_type):self.notify_fraud_detection(user_name,account_no)# .. now, produce the response for our caller.
self.response.payload={'user_name':user_name,'user_type':user_type,'account_no':account_no,'account_balance':account_balance,}

Zato tutorial

Zato tutorial

Click here to get started - and remember to visit our Twitter, GitHub and Gitter communities as well.


Viewing all articles
Browse latest Browse all 23354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>