Skip to main content

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)

Source distribution for requestsWS 0.0.17
File Size Uploaded
requestsWS-0.0.17.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for requestsWS 0.0.17
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.17 This release

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page