0

I am working on a Pyramid python application which employs python-socketio to communicate with the frontend, but I find no information about how best to integrate the my Pyramid views and models with socket.io calls.

I adapted python-socketio Flask example to use Pyramid (and it works): https://github.com/pascalin/python-socketio/blob/main/examples/server/wsgi/pyramid_app.py

But even when Pyramid and socket.io calls coexist, the socket.io server does not check for the security policy which Pyramid is employing, and I would like to be able to emit socket.io events based on Pyramid events and views. Do you have any suggestions about how to take this simple example in the direction I want?

Thank you!

pascalin
  • 1
  • 2
  • I have no idea, but I found this Pyramid add-on that might provide guidance. https://pypi.org/project/gevent-socketio/ – Steve Piercy Sep 21 '22 at 06:52
  • @StevePiercy Thank you, I will check this carefully. But by looking at it superficially I think it ties me with gevent, while the python-socketio example I linked above is compatible with eventlet, gevent or even waitress. I will keep trying and if I find a different solution I will come back to update my question. – pascalin Sep 22 '22 at 02:23

0 Answers0