You are currently in branch for PySiddhi 4.x
The scope of this project is to develop a Python Wrapper on Siddhi CEP Library. The Python wrapper would support Siddhi 3.1 and Siddhi 4.0. A REST Client is also developed to interact with WSO2 Data Analytics Server (DAS) 4.0.
This is currently a work in progress, as a project for Google Summer of Code 2017 Program.
Note: Currently the API is configured with Siddhi CEP 3.1.0 (in branch 3.x), Siddhi CEP 4.0.0-M53 (in branch master) and WSO2 Data Analytics Server 4.0.0-M6 (in branch master) for Python 2.7.x and Python 3.x
- Develop a Python Wrapper on Siddhi Java Library 3.1 and 4.0.
- Extend the wrapper to support interactions with WSO2 DAS 4.0.
- Testing, Documentation and Deployment
- Basic features of Siddhi CEP Core 3.1 and 4.0
- Wrapper on Siddhi Debugger (for PySiddhi4 only)
- Support to Siddhi Extensions Loading
- Rest Client on WSO2 DAS 4.0 - Siddhi App Management (for PySiddhi4 only)
- Rest Client on WSO2 DAS 4.0 Event Simulator (for PySiddhi4 only)
- Unit Tests
- Wiki
- Deployment wheels
-
Install following pre-requisites.
- Python 2.7 or 3.x
- Requests (
sudo apt-get install requests
) - Cython (
sudo apt-get install cython
) - Pyjnius (
sudo pip install pyjnius
) - Future (
sudo pip install future
) - Python Developer Package (
sudo apt-get install python-dev python3-dev python-dev
) - libboost for Python (
sudo apt-get install libboost-python-dev
) - Maven and Java 8
- g++ and other development tools
sudo apt-get install build-essential g++ autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev
- For use of WSO2 DAS 4.0 Client functionality, it is required to have WSO2 DAS 4.0 installed and running. (Refer Running the Tests section for installation details)
-
Install using Setup.py.
- Clone the relevant branch (3.1 or 4.0) from GitHub Repository.
- Navigate to project root and run
sudo pip install .
-
Use the Library using Python.
- For Siddhi CEP 3.1
from PySiddhi3.core.SiddhiManager import SiddhiManager sm = SiddhiManager() .... sm.shutdown()
- For Siddhi CEP 4.0.0-M53
from PySiddhi4.core.SiddhiManager import SiddhiManager sm = SiddhiManager() .... sm.shutdown()
*Refer Tests to get more familiar with library functionality.
- Install pre-requisites mentioned in
Installing the Library from Source
section. - Compile Java Libraries.
- Navigate to
PySiddhi/PySiddhi4Proxy
and runmvn clean install
- Navigate to
- For running tests on WSO2 DAS 4.0 Client, it is required to have WSO2 DAS 4.0 installed and running.
- Obtain WSO2 DAS 4.0-M6 binary distribution from https://github.com/wso2/product-das/releases/tag/v4.0.0-M6.
- Extract
wso2das-4.0.0-SNAPSHOT.zip
to a suitable location (sayDAS_HOME
). - Navigate to
DAS_Home/bin/
and runsh worker.sh
.
- Run the tests cases in
PySiddhi/Tests
directory
*If mvn clean install throws errors, check the paths provided for imports of Python3 Developer Headers
- Install pre-requisites mentioned in
Installing the Library from Source
section. - Delete directory
build
if exist. - Goto source root and run
python setup.py bdist_wheel --plat-name manylinux1_x86_64
Note: You need to use linux operating system to build linux wheels.
- Install pre-requisites mentioned in
Installing the Library from Source
section. - Delete directory
build
if exist. - Goto source root and run
python setup.py bdist_wheel --plat-name win-amd64
Note: You need to use Windows operating system to build Windows wheels.
- Make sure all pre-requisites are met.
(You may have to separately install cython using
pip install cython
if you use virtual environments) - Install python wheel using
pip install [path_to_wheel_file]
.
Siddhi is a Query Language and a Library for Realtime Complex Event Processing developed by WSO2 Inc. Siddhi CEP is currently used in WSO2 Data Analytics Server, an Enterprise Level Open Source Data Analytics Solution.
Further information on above products are available in the links below.
- Siddhi 4.0 Library (In Development Version)
- Siddhi 3.1 Library (Stable Release)
- WSO2 Data Analytics Server 4.0 (In Development Version)
- GitHub - https://github.com/wso2/product-das
- Documentation - https://docs.wso2.com/display/DAS400/Quick+Start+Guide
- WSO2 Data Analytics Server 3.1 (Stable Release)
- Madhawa Vidanapathirana
- Email: madhawavidanapathirana@gmail.com
- Organization: University of Moratuwa
Developer Mail Group: dev@wso2.org