Skip to main content

A simple, intuitive Socket.IO CLI.

Project description

sockterm

A CLI terminal client for Socket.IO.

Usage

Run sockterm to start the CLI. You should see a prompt: sockterm>

Type connect {url} to connect to a Socket.IO server. For instance, to connect to a local Socket.IO server over WebSockets on port 5000, type connect ws://localhost:5000.

To emit a message to the server, type emit {event} {data}. For example, to emit a JSON message to the hi_mom event, type emit hi_mom '{ "mom": "hi" }'. Note the single quotes.

You can also "call" an endpoint on the server by using call {event} {data}. This is functionally the same as emit, but will block until the server responds. It's useful for determining whether your requests are getting through properly.

You can subscribe to a topic by typing subscribe {event}. This will output messages on an event indefinitely. To stop the output, hit Ctrl+C until the output stops. (Proper stoppage will be implemented later.)

Help can be shown by typing --help on any command, or by itself.

All publish/subscribe commands above accept an optional namespace argument. To publish/subscribe on a non-default namespace, add --namespace {namespace} to the command.

Project details


Download files

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

Source Distribution

sockterm-0.0.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

sockterm-0.0.1-py3.9.egg (10.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page