Python realtime engine demonstration¶
An example realtime engine that uses a Python function in the
upd and demonstrates multidependency service for QPacker
As QPacker relies on a
requirements.txt in the project root directory for creating the Docker image, the Machine Learning Toolkit
requirements.txt has been copied in.
The engine can be built with
The engine can be run standalone and locally with
Connection to a tickerplant can be specified in the command line.
qp run prte -binlinux -- tp :localhost:5000
qp run prte
Networking will have to be managed if it is run standalone in Docker. Again, command-line arguments can supply tickerplant details.
qp run prte -- tp :tickerplant:5000
If Docker Compose is used, the service can be specified to interact with basic-tick-system.
docker-compose.yaml in the root dir:
The service can receive data into
upd in the format
data is a table with columns
The result of
upd is a table with columns
The Python function prints the number of rows received and double the price column.
Interaction with basic-tick-system¶
The data format matches that of basic-tick-system, so can be connected to the basic-tick-system’s tickerplant.