Python Integration with FastAPI
On Linux OS, Panopticon can be integrated with Python using FastAPI instead of Pyro4.
Python integration with FastAPI has the advantage of supporting parallel processing.
Requirements:
- Python 3.8 or higher
- Python packages:
- uvicorn >= 0.20.0
- gunicorn >= 20.1.0
- fastapi >= 0.88.0
- pandas >= 1.5.1
- serpent >= 1.41
- Copy the panopticon_fastapi_py folder to the host where you have your Python environment.
This can be the same host as where Panopticon is running, i.e., localhost from the point of view of Panopticon. If you are using different hosts, ensure that the firewall portmapping settings allow traffic on port 9090.
You can place the folder to your preferred location.
- Set the following values in the Panoption.properties file:
connector.python.host=<your_python_host>
connector.python.mode=fast_api
connector.python.port=9090 - Restart Tomcat.
NOTE:
- To start the FastAPI service, run the start.sh file with elevated privileges:
sudo ./start.sh
- To get back to the Linux prompt, hit Ctrl+Z (^Z) to pause the process and immediately run the command bg to send the process to the background.
- To shut down the FastAPI service, run the stop.sh file with elevated privileges:
sudo ./stop.sh
(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.