TRIGGERcmd Python Package
For the full TRIGGERcmd agent, visit https://triggercmd.com.
Use this package to listen for triggers sent to a computer in your TRIGGERcmd account.
Send triggers with Amazon Alexa, Google Assistant, IFTTT, Zapier, Smart Things, etc. See this page for more ways.
Usage:
import json
from triggercmd import agent
computer_id = (your triggercmd computer id)
token = (your triggercmd token)
def my_function(msg):
print(msg)
message = json.loads(msg)
print("Received this trigger:", message['trigger'], "and these parameters:", message['params'])
agent.connect(computer_id, token, my_function)
Example output:
Connected
{"trigger":"Notepad","id":"13123391234567891acbf124","params":"on"}
Received this trigger: Notepad and these parameters: on
{"trigger":"Calculator","id":"13123391234567891acbf123","params":"on"}
Received this trigger: Calculator and these parameters: on
{"trigger":"Calculator","id":"13123391234567891acbf123","params":"off"}
Received this trigger: Calculator and these parameters: off
Based on this project:
https://github.com/gilsdav/python_sails_websocket_client/tree/master
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
triggercmd-0.0.36.tar.gz
(17.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file triggercmd-0.0.36.tar.gz.
File metadata
- Download URL: triggercmd-0.0.36.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
932e94d22028c5031ec21fa007b8011bad4fbb152738e35ef768a8ea2ca01905
|
|
| MD5 |
f242047ae07813ac405969d56d6fc7be
|
|
| BLAKE2b-256 |
6a9291794ea95d7a37c2c8f2a416113cd72fe936d15f7f245bc27c48a116e851
|
File details
Details for the file triggercmd-0.0.36-py3-none-any.whl.
File metadata
- Download URL: triggercmd-0.0.36-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e54b6f27f4884a240d23e86a68d04e6017cb87614ea341ce5b4d36c4cec874fe
|
|
| MD5 |
42d9a50ac995cc07f3aef25dfc19aa8f
|
|
| BLAKE2b-256 |
ea3458b7ffc1574ce5d25326a361742a8275e2ef7cc63cf51f66afc4e869beda
|