The Requests like WS module
Project description
RequestsWS
The Requests like WS module
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.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for requestsWS-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb1193372e5d27da1bca099cf1d93347ba705a065c2c9d3becd69e0a4eb5c57 |
|
MD5 | 9ef2a824b18333a534875e6419e0c717 |
|
BLAKE2b-256 | 62ea33d17532f04f96c7545bc26fb4b6fb4ef34dbe2d85767dedd9470c4bf25d |