Background
@dogi wanted a replacement of the wscat tool (a tool that connects to a gateway with WebSockets) to be used for the new Discord feature implementation #2155 . Since wscat requires a npm install, a luxury we can't afford, a replacement universally built-in is needed. Websocat, socat, and netcat were recommended but I found a better solution: wsdump.py.
wsdump.py module is located in the /usr/local/bin directory.
But the question is how did it get there.
Investigation
In order to use wsdump.py for the Discord feature, we have to be 100% certain that it is accessible from the start and does not require any superfluous installation. We've looked into debian/pip package manager and github history but found no success on the origin of wsdump.py
Solution
I figured that wsdump.py came from a package as a dependency but wasn't sure how until through my research, discoverd docker-compose has a connection to websockets.

I tried to install docker-compose on my vanilla raspberry pi with pip but no success since it required the use of Python 3.....
I then successfully installed docker-compose with the use of pip3:

Saw that it installed the websocket-client dependency package...

And I found wsdump.py

Lesson learned
wsdump.py comes pre-installed with docker-compose
- When working with Python, make sure to know which version your using (@dogi and I were looking in Python2.7 not Python3).
Background
@dogi wanted a replacement of the
wscattool (a tool that connects to a gateway with WebSockets) to be used for the new Discord feature implementation #2155 . Sincewscatrequires a npm install, a luxury we can't afford, a replacement universally built-in is needed. Websocat, socat, and netcat were recommended but I found a better solution:wsdump.py.wsdump.pymodule is located in the/usr/local/bindirectory.But the question is how did it get there.
Investigation
In order to use
wsdump.pyfor the Discord feature, we have to be 100% certain that it is accessible from the start and does not require any superfluous installation. We've looked into debian/pip package manager and github history but found no success on the origin ofwsdump.pySolution
I figured that
wsdump.pycame from a package as a dependency but wasn't sure how until through my research, discoverddocker-composehas a connection to websockets.I tried to install
docker-composeon my vanilla raspberry pi with pip but no success since it required the use of Python 3.....I then successfully installed
docker-composewith the use of pip3:Saw that it installed the
websocket-clientdependency package...And I found
wsdump.pyLesson learned
wsdump.pycomes pre-installed withdocker-compose