Home - madhawav/DASPythonClient GitHub Wiki

Welcome to DAS Python Client wiki.

WSO2 Data Analytics Server (WSO2 DAS) is an Enterprise Grade Open Source Data Analytics Solution developed by WSO2 Inc. DAS Python Client is a Python Client on REST API exposed by WSO2 Data Analytics Server 4.0. This API covers Event Simulator and Siddhi App Management functions of WSO2 DAS Analytics Server 4.0.

The Python Client is compatible with WSO2 Data Analytics Server version 4.0.0-SNAPSHOT which is available here as an in development unreleased product.

Note: This API is work in progress, as a project for Google Summer of Code 2017 Program.

Content

Quick Demo

The following is a demo code on Siddhi App Management. This code retrieves the list of Siddhi Apps published in WSO2 DAS 4.0.

Step 1 - Download, Compile and Run WSO2 DAS 4.0.

Step 2 - Load Python Imports.

from DAS4PythonAPI.DAS4PythonClient import DAS4PythonClient

Step 3 - Connect to WSO2 DAS 4.0 via REST API and obtain SiddhiApp Management Client.

dasPythonClient = DAS4PythonClient('http://localhost:9090')
siddhiAppManagementClient = dasPythonClient.getSiddhiAppManagementClient()

Step 4 - Obtain list of Siddhi Apps published in WSO2 DAS.

print(siddhiAppManagementClient.listSiddhiApps())

Receive Outputs

['TestSiddhiApp']

Cleanup - Stop WSO2 DAS 4.0 by sending Ctrl+C to terminal window running worker.sh. This would do a graceful shutdown.

Installation

DAS Python Client can be installed as a Python Library from Source Code. No binary releases are available as of now.

Refer Installation Guide for installation prerequisites and other details. Using the following PIP command, it is possible to directly install DAS Python Client API from online GitHub Repository.

Installing DAS Python Client

pip install git+https://github.com/madhawav/DASPythonClient.git