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!
Metadata
Release files for requestsWS 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| requestsWS-0.0.17.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| requestsWS-0.0.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / requestsWS-0.0.17.tar.gz
| Download URL | requestsWS-0.0.17.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48141d96d07b2fce9458b62cccc9765baf419eadc7d254686562af552245682f
|
|
BLAKE2b-256 checksum How to use checksums |
0cbbfc2048c4dd6d31cc1b5b4234627a4e1bcfe3aead2df4472183ca1eddbd9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / requestsWS-0.0.17-py3-none-any.whl
| Download URL | requestsWS-0.0.17-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b00319c9437ef5557e1189e87cddc0fb2e64035f17032314d2b5bf83e92ebc9
|
|
BLAKE2b-256 checksum How to use checksums |
a4a14409756acbb61645cba5093cca23f5b665edca2b5733fedf9b70ea75ed2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|