https://github.com/mcejp/matplotlib-streaming-example
Matplotlib figure streaming to the browser via RabbitMQ & Flask
https://github.com/mcejp/matplotlib-streaming-example
Last synced: about 1 year ago
JSON representation
Matplotlib figure streaming to the browser via RabbitMQ & Flask
- Host: GitHub
- URL: https://github.com/mcejp/matplotlib-streaming-example
- Owner: mcejp
- Created: 2021-05-08T13:37:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T13:52:16.000Z (about 5 years ago)
- Last Synced: 2025-03-09T01:29:40.174Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 222 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Matplotlib streaming via [RabbitMQ](https://www.rabbitmq.com/)

Run it like this:
```shell
# shell 1
docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
# RabbitMQ admin interface will be available on http://localhost:15672/ (login: guest/guest)
# shell 2
python3 producer.py hello_world png
# shell 3
flask run
```
Then navigate to whatever URL is displayed by Flask.
In practice, Matplotlib seems to be able to keep up to about 10 FPS.
Adapted from https://medium.datadriveninvestor.com/video-streaming-using-flask-and-opencv-c464bf8473d6