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('wss://localhost:8765', interval=20, json=payload)
payload = "hello world"
resp = requestsWS.post("wss://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!
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.17.tar.gz
(12.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file requestsWS-0.0.17.tar.gz.
File metadata
- Download URL: requestsWS-0.0.17.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48141d96d07b2fce9458b62cccc9765baf419eadc7d254686562af552245682f
|
|
| MD5 |
79b4eddfcc74680f2d88d3d9ea3873bd
|
|
| BLAKE2b-256 |
0cbbfc2048c4dd6d31cc1b5b4234627a4e1bcfe3aead2df4472183ca1eddbd9f
|
File details
Details for the file requestsWS-0.0.17-py3-none-any.whl.
File metadata
- Download URL: requestsWS-0.0.17-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b00319c9437ef5557e1189e87cddc0fb2e64035f17032314d2b5bf83e92ebc9
|
|
| MD5 |
0b2fd84ed2148a6cfccc2dd90ea15de4
|
|
| BLAKE2b-256 |
a4a14409756acbb61645cba5093cca23f5b665edca2b5733fedf9b70ea75ed2e
|