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 details)
Built Distribution
File details
Details for the file requestsWS-0.0.1.tar.gz
.
File metadata
- Download URL: requestsWS-0.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15db58d73c722cefdb849625de44d04ed9d1bdd28d7b61aac61b3dcba6e9eff4 |
|
MD5 | b13beecf4532984ab65faae4467b8323 |
|
BLAKE2b-256 | 4fd74028d3de0b800831aca54711ccaeb03149c1465be61525ea29084c2f1cea |
File details
Details for the file requestsWS-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: requestsWS-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb1193372e5d27da1bca099cf1d93347ba705a065c2c9d3becd69e0a4eb5c57 |
|
MD5 | 9ef2a824b18333a534875e6419e0c717 |
|
BLAKE2b-256 | 62ea33d17532f04f96c7545bc26fb4b6fb4ef34dbe2d85767dedd9470c4bf25d |