The Requests like WS module
Project description
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!
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.12.tar.gz
(11.9 kB
view details)
Built Distribution
File details
Details for the file requestsWS-0.0.12.tar.gz
.
File metadata
- Download URL: requestsWS-0.0.12.tar.gz
- Upload date:
- Size: 11.9 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 | 3e9f520eab80c3bf48330e9da2ab5ad8754d545757a7f4940cc0c65f4f41c788 |
|
MD5 | f39ba1704ddeb7cad51572747249198b |
|
BLAKE2b-256 | 5e2402993e2c6eef253a6a26276eb270bf91838d5f5afce689de679ef624163d |
File details
Details for the file requestsWS-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: requestsWS-0.0.12-py3-none-any.whl
- Upload date:
- Size: 8.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 | a20ed5086796237dbe574aa6c13c21c194b62fb120d20e4fb2181212bc121e70 |
|
MD5 | 2eae34a6f9b906de2a6ad71c3f613997 |
|
BLAKE2b-256 | 9d075d487d63cb6fd6fdf38dbf88090c3403d31f20c202d0445dc1566df1cde9 |