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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Egg

File details

Details for the file sockterm-0.0.1.tar.gz.

File metadata

  • Download URL: sockterm-0.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for sockterm-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0fd8561dbf662f09316b05797411fa7be69aaadc48944cfa093fbff03d0f4b55
MD5 120b5f5c37e3603181263f4f06f1525b
BLAKE2b-256 9d192940a05a880f4ad98a66e568e9b6d18d3dc9df240a402322304798085de1

See more details on using hashes here.

File details

Details for the file sockterm-0.0.1-py3.9.egg.

File metadata

  • Download URL: sockterm-0.0.1-py3.9.egg
  • Upload date:
  • Size: 10.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for sockterm-0.0.1-py3.9.egg
Algorithm Hash digest
SHA256 7583fb2a07b4e6b163d8949e80c763935e8d44b45b8610611086e1acd41b9e84
MD5 2e16fba5d411932e9718052d34e2da20
BLAKE2b-256 46246b671ae205f1be52764e46c974b97c51949a0323861d9c330aff057ea889

See more details on using hashes here.

Supported by

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