Skip to main content

Websocket plugin for Hoocron

Project description

hoocron-plugin-websocket

Websocket client plugin for Hoocron

Install

pip3 install hoocron-plugin-websocket

Usage

$ hoocron.py --ws TICK --wsroom myapps::u1 --wsurl http://localhost:8899/ --wssecret myapps-pass
...
started websocket thread, watch room 'myapps::u1' on http://localhost:8899/
Websocket connected to http://localhost:8899/

run TICK from websocket
Tick! (uptime: 6 seconds)
Result(TICK): ticked

Server-side

Redis

SET ws-emit::secret::myapps myapps-pass

ws-emit

ws-emit.py -a 0.0.0.0:8899 --cors '*' --secret 123

curl

curl -d @/tmp/x.json -H "Content-Type: application/json" -X POST http://localhost:8899/emit

/tmp/x.json:

{
	"event": "update",
	"room": "myapps::u1",
	"data": "TICK",
	"namespace": null,
	"secret": "123"
}

See also

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

hoocron_plugin_websocket-0.0.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

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