Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

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.4 * Python 2.7


Option A

pip it!

&> pip install WebSocketCommandline

Option B

No special installation needed for now. Download the file and run it with python interpreter.

&> python

Dependencies can be installed by:

&> sudo pip install -r requirements.txt

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

&> python --port 12345

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

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

This will make the server listen on
ws://localhost:12345/iamawebsocket 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.


Release History

Release History

This version
History Node

History Node

History Node

History Node

History Node

History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
WebSocketCommandline- (5.8 kB) Copy SHA256 Checksum SHA256 Source Sep 4, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting