Skip to content

Sample implementation of Zserio service HTTP backend in Python

License

Notifications You must be signed in to change notification settings

ndsev/zserio-service-http-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zserio Service HTTP backend


Sample implementation of Zserio Service HTTP backend in Python.

Prerequisites

  1. Java JRE 8+

  2. Python 3.8+

  3. Web framework flask:

    python3 -m pip install flask
    
  4. Zserio compiler with Python runtime library:

    python3 -m pip install zserio
    

Usage

Calculator Example

cd examples/calculator
# generate service using Zserio
zserio calculator.zs -python ../../build/gen

export PYTHONDONTWRITEBYTECODE=1
export PYTHONPATH=../../src:../../build/gen
python3 calculator_server.py &
python3 calculator_client.py
# follow client's instructions
# ...
# press q + ENTER to quit the client
fg
# press Ctrl+C to quit the server

About

Sample implementation of Zserio service HTTP backend in Python

Resources

License

Stars

Watchers

Forks

Languages