Skip to main content

A Python script to test WebSocket.

Project description


WebSocketCommandline is a command line tool to easily test the connectivity of WebSocket client/server in shell with Python.


Tested with: * Python 3.5.2 * Python 2.7.12


pip it!

&> pip install WebSocketCommandline


Try it!

&> websocket_tester

More Options

websocket_tester will automatically start a WebSocket server at startup. To change the default server port:

&> websocket_tester --port 12345

In addition to the port, you can also change the WebSocket URI path for the server:

&> websocket_tester --port 12345 --url-root iamawebsocket

This will make the server listen on

websocket_tester has both builtin Server and Client support, in order to connect to a server:

# After starting the tool.
# Assumed the tool starts with --port 12345 --url-root iamawebsocket
>> connect 12345 iamawebsocket

List all connected Clients/Servers

# After starting the tool.
>> list

Send text message to the Client/Server

# After starting the tool.
# The client_id can be found in 'list' command
>> send [client_id] [text you want to send]


  • Better log/output handling
  • [STRIKEOUT:Can be installed by pip]
  • [STRIKEOUT:Tested against python2]


The MIT License (MIT)

Copyright (c) 2016 owwlo

Licensed under the MIT License. See the top-level file LICENSE.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for WebSocketCommandline, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size WebSocketCommandline-0.0.8.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page