wampproto-python
Sans-IO implementation of the WAMP protocol in Python
This is a library that could be used to build a WAMP client or server. It operates on strings and bytes. A WAMP client can be split into two parts.
- Session establishment
- Session management.
Assuming we have a websocket connection established to a WAMP server using sub protocol wamp.2.json. The first
"message" is going to be sent by the client as HELLO
from wampproto.joiner import Joiner
j = Joiner("realm1")
# this doesn't actually send the message, it just returns the
# payload that needs to be sent over websocket.
hello = j.send_hello()
ws.send_str(hello)
response = ws.receive_str()
to_send = j.receive(response)
if to_send is None:
# if there is nothing to send, this means
# the server returned WELCOME.
print(j.get_session_details())
Now that the session is established, we could instantiate a WAMPSession instance
to handle further messages.
from wampproto.session import WAMPSession
from wampproto.messages import Call
from wampproto.idgen import SessionScopeIDGenerator
session = WAMPSession()
idgen = SessionScopeIDGenerator()
call = Call(idgen.next(), "foo.bar")
to_send = session.send_message(call)
ws.send_str(to_send)
incoming_payload = ws.receive_str()
result = session.receive(incoming_payload)
print(result)
Metadata
Release files for wampproto 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wampproto-0.4.0.tar.gz | 26.3 kB | Without provenance | Details for wampproto-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wampproto-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for wampproto-0.4.0-py3-none-any.whl |
Total release size: 71.3 kB
Release files / wampproto-0.4.0.tar.gz
| Download URL | wampproto-0.4.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb3bba2f58035b12ed99577c29730b5137e0ff2a80cc2f38fabfedc7d686e2ce
|
|
BLAKE2b-256 checksum How to use checksums |
93c7ea22f0601be2052c1550e6378a3c20fb6a8da8c4eabe8ddce10bd531972a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.10
|
Release files / wampproto-0.4.0-py3-none-any.whl
| Download URL | wampproto-0.4.0-py3-none-any.whl |
|---|---|
| Size | 45.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
125eb3992140fc15c6d48dea0fecf0e4f95fdd565072db42051fe94fd4786162
|
|
BLAKE2b-256 checksum How to use checksums |
963b4a3658cf1937c63af0f9d706f88e0eb879891d81e4b2c75e362ed92fe884
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.10
|
Security for wampproto 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.