- Clone Repo
- Build Environment
- Launch Application
- Request a Stream
git clone https://github.com/AI-Gruppe/OmnAIView-DevDataServer
cd OmnAIView-DevDataServer/example_python/
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python ./main.pyFrom another session you can now use a data-stream with a websocket-consumer of your choice. Read Initializing a Datastream to see how to work with the provided server.
The example provides a dataserver for Version 2.0.0 of the Async API description. It implements a REST-API endpoint as well as a websocket endpoint on port 8080. Data from the datasource can be received in json and csv format. The first datastream is a sinus, the second a rectangular function. The timestamps are UNIX timestamps.
To start the example make sure you have python3.12 (or newer) installed on your system.
Open your CLI. Use either Windows or Linux and navigate into the example_python sub-directory of this project.
Type the following command into your CLI:
python3.12 -m venv env Depending on wether you are running Linux or Windows the command to activate a virtual environment looks a little different due to shell specifications.
On Linux:
source ./env/bin/activateOn Windows
.\env\Scripts\activate If you want to learn more about managing Libraries with venv check out this tutorial.
pip install -r requirements.txtpython ./main.pyIf successfull you will receive the message: "Server running on port 8080 (HTTP & WebSocket)" in your Terminal. Proceed with initializing a datastream from your client