The Requests like WS module
Project description
RequestsWS
The Requests like WS module
Installation
pip install requestsWS
Usage
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('ws://localhost:8765', interval=20, json=payload)
payload = "hello world"
resp = requestsWS.post("ws://localhost:8765", data=payload)
print(resp.json())
TO DO
- 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
Documentation
Coming soon!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requestsWS-0.0.6.tar.gz
(11.9 kB
view hashes)
Built Distribution
Close
Hashes for requestsWS-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d90c81eff5b8b253f6aabf85b026b0e4bafe967806e04295c55cef53f009afc |
|
MD5 | 9e0eecc0f7f1f0e5334f20f51dfcbfc7 |
|
BLAKE2b-256 | 2cf787f2330c719505850515325d326b0927ad27aefa49f0ff9c48b52f3c1d7e |