The Requests like WS module
pip install requestsWS
Sessions is not documented yet, but it works like requests
import requestsWS
payload = {
"message": "hello world!"
}
resp = requestsWS.post("wss://localhost:8765", identifiers={"message": "Hi there!"}, json=payload)
print(resp.text)
payload = {
"method": "server.ping"
}
requestsWS.keepConnection('wss://localhost:8765', interval=20, json=payload)
payload = "hello world"
resp = requestsWS.post("wss://localhost:8765", data=payload)
print(resp.json())
- Multiple connections at once (Use array instead of string), until then use Sessions
- Add support for identifiers that are deeper into the json
- Add string support for identifier (Check if identifier in string)
- Add string support for identifier (Check if identifier in string)
- Fix timeout
Coming soon!