The Requests like WS module
Project description
RequestsWS
The Requests like WS module
Installation
pip install requestsWS
Usage
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)
- Add headers for opening connections
- Add support for identifiers that are deeper into the json
- Add string support for identifier (Check if identifier in string)
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.2.tar.gz
(8.9 kB
view hashes)
Built Distribution
Close
Hashes for requestsWS-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 574d51726bd39c4cb46ceb4ed1916b924deadde235985227c5e0996a989c052a |
|
MD5 | e284cb3188a8ebd2c52831838cf34802 |
|
BLAKE2b-256 | 4f74a703ff75485ee339d28d9f6a8d9cd54f0ce906f729c5baeca8652f698f87 |