WebSocket client for Python

Overview

docs Build Status Downloads

websocket-client

The websocket-client module is a WebSocket client for Python. It provides access to low level APIs for WebSockets. All APIs are for synchronous functions.

websocket-client supports only hybi-13.

License

  • BSD

Documentation

This project's documentation can be found at https://websocket-client.readthedocs.io/

Contributing

Please see the contribution guidelines at https://websocket-client.readthedocs.io/en/latest/contributing.html

Installation

First, install the following dependencies:

  • six
  • backports.ssl_match_hostname for Python 2.x

You can install the dependencies with the command pip install six and pip install backports.ssl_match_hostname

You can use either python setup.py install or pip install websocket-client to install. This module is tested on Python 2.7 and Python 3.4+. Python 3 support was first introduced in version 0.14.0, but is a work in progress.

Usage Tips

Check out the documentation's FAQ for additional guidelines: https://websocket-client.readthedocs.io/en/latest/faq.html

Performance

The "send" and "validate_utf8" methods are very slow in pure Python. If you want to get better performance, please install both numpy and wsaccel. Note that wsaccel can sometimes cause other issues.

HTTP proxy

This project supports WebSocket connections over a HTTP proxy. The proxy server must allow "CONNECT" method to websocket port. The default squid proxy setting is "ALLOWED TO CONNECT ONLY HTTPS PORT".

The current implementation of websocket-client is using the "CONNECT" method via proxy. Here is an example of using a proxy:

import websocket
ws = websocket.WebSocket()
ws.connect("ws://example.com/websocket", http_proxy_host="proxy_host_name", http_proxy_port=3128)

Long-lived connection

This example is similar to how WebSocket code looks in browsers using JavaScript.

import websocket
try:
    import thread
except ImportError:
    import _thread as thread
import time

def on_message(ws, message):
    print(message)

def on_error(ws, error):
    print(error)

def on_close(ws):
    print("### closed ###")

def on_open(ws):
    def run(*args):
        for i in range(3):
            time.sleep(1)
            ws.send("Hello %d" % i)
        time.sleep(1)
        ws.close()
        print("thread terminating...")
    thread.start_new_thread(run, ())


if __name__ == "__main__":
    websocket.enableTrace(True)
    ws = websocket.WebSocketApp("ws://echo.websocket.org/",
                              on_message = on_message,
                              on_error = on_error,
                              on_close = on_close)
    ws.on_open = on_open
    ws.run_forever()

Short-lived one-off send-receive

This is if you want to communicate a short message and disconnect immediately when done.

from websocket import create_connection
ws = create_connection("ws://echo.websocket.org/")
print("Sending 'Hello, World'...")
ws.send("Hello, World")
print("Sent")
print("Receiving...")
result =  ws.recv()
print("Received '%s'" % result)
ws.close()

If you want to customize socket options, set sockopt, as seen below:

from websocket import create_connection
ws = create_connection("ws://echo.websocket.org/",
                        sockopt=((socket.IPPROTO_TCP, socket.TCP_NODELAY),))

More advanced: custom class

You can also write your own class for the connection, if you want to handle the nitty-gritty details yourself.

import socket
from websocket import create_connection, WebSocket
class MyWebSocket(WebSocket):
    def recv_frame(self):
        frame = super().recv_frame()
        print('yay! I got this frame: ', frame)
        return frame

ws = create_connection("ws://echo.websocket.org/",
                        sockopt=((socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),), class_=MyWebSocket)

Acknowledgements

Thanks to @battlemidget and @ralphbean for helping migrate this project to Python 3.

Comments
  • Official Apache 2.0 License Transition

    Official Apache 2.0 License Transition

    Hello websocket-client contributors! :wave:

    After discussion with the community, a consensus decision has been made to move the websocket-client project to the Apache 2.0 license. This issue was created to receive all project contributor’s approval for changing to this open and permissive license. 

    If you are on the list of contributors below, you can show your approval by commenting on this issue saying “Yes, I consent to the change to the Apache 2.0 license”. That’s all you need to do, but more explanation is below if you want. The deadline is ~~June 30~~ July 15 2021. If you have not contributed code, please refrain from cluttering this thread. Issue #665 was created for the license discussion if you have general comments on this transition.

    Why is the license changing? Depending on when you contributed, the project was previously labeled LGPL or BSD. The license history for this project was a bit messy, so with this change we aim to:

    1. Allow websocket-client to be useful to as many users as possible via the open and permissive Apache 2.0 license.
    2. Resolve the confusion around how this project is licensed. Opinions for which license to use were solicited from the community in issue #665.
    3. Make this transition in a legally clean way that respects the rights of contributors

    Why do I have to approve of the change? To make the license change official, all contributors must agree to have their work relicensed under the new license. That’s how it works in the open source world - your contribution became part of the project, but it still belongs to you.

    What if I don’t approve? Please leave a note stating this. Most likely your contribution will be removed from the code base.

    Other questions: The process of changing a license can be confusing, so just ask if you have questions. General comments on the transition can be added to issue #665.

    Contributors:

    Note 1: crossed out names have granted their consent to this change and this post will be edited regularly with updates to the list Note 2: the contributor list is split up due to the GitHub limit on the number of people that can be tagged in one post [email protected]~~ @2-5 [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ @BonkaBonka [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ @cdare @cgtx [email protected]~~ [email protected]~~ @cjhanks @cmiacz [email protected]~~ [email protected]~~ @CptPicard [email protected]~~ @DainDwarf @damjanstulicsonos [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ [email protected]~~ @dmiyakawa [email protected]~~ [email protected]~~ @dwelch91

    opened by engn33r 166
  • Default WebSocket Connection Timeout with Microsoft.WebSockets

    Default WebSocket Connection Timeout with Microsoft.WebSockets

    I'm using Microsoft.WebSockets on my server. When I form a WebSocket with a browser (without any ping messages), the connection with the server lasts at least 12 hours (which is as much I've tested). But with your Python WebSocket client, it seems to disconnect at 31 minutes, 13 seconds. I've repeatedly tested at 31 minutes and 12 seconds, and it still works, but at 31 minutes and 13 seconds, the connection is dead. Why would this be? In the meantime, I just make sure to ping every 30 minutes, and the connection stays alive. (By the way, this project is pretty cool. Thank you!)

    opened by wessleym 28
  • What is the better way to establish and reconnect to websocket with threads?

    What is the better way to establish and reconnect to websocket with threads?

    Hello @liris and team

    we have this:

    ws_connections = []
    func_message = partial(WSClientProtocol.on_message, factory)
    ws = websocket.WebSocketApp(
            url,
            on_message=func_message,
            on_error=WSClientProtocol.on_error,
            on_close=WSClientProtocol.on_close,
        )
        ws.on_open = WSClientProtocol.on_open
        ws_connections.append(ws)
        wst = threading.Thread(target=ws.run_forever, kwargs={'ping_interval': 5, 'ping_timeout' : 2})
        wst.daemon = True
        wst.start()
    

    the issues and questions we have

    • as soon the server disconnect the connection due to server restart / maintenance etc., the threaded websockets will be closed and no new data are arriving aswell after restart.

    • there is no log entry after closing the connection. How shall we do to see the reason of closing?

    • There is no automatic reconnect to the server. I have to restart the engine manually. How shall we do to try to reconnect if no connection is given?

    thank you in advance. Alex

    bug 
    opened by alexnanzer 22
  • Legitimacy of license change

    Legitimacy of license change

    opened by jugglinmike 22
  • How to re-establish the WebSocket Connection to the server: Please Advice

    How to re-establish the WebSocket Connection to the server: Please Advice

    Hello liris,

    I greatly appreciate your work and this is working great in happy scenarios !! Great

    Since I need to cover few more cases of network failure/re-connection: When WebSocket Client loses network connection to the server. What Exception websocket.py throws and what is the best way for me to re-establish the connection back the server. I am using WebSocketApp class and On_message, On_Error, On_Close and On-Open mentods. Currently, Websocket does not seem to throw any exception immediately. It tries for 15-20 iteration and goes calls on_error() function. (Please correct me if my understanding is wrong) Given this: What is the best way for me to re-connect with the server. Any sample code/documentation is greatly appreciated

    Please advice, High Regards

    Srini

    opened by srini-murthy 22
  • run_forever example seems not to work for me

    run_forever example seems not to work for me

    Greetings! I apologize in advance if I am doing something foolish, because Python is not a language I use much, but I find myself needing to build a daemon that communicates with a web socket in order to offer better control of my automated blinds at home, and this project looks like a great solution. However, I can’t seem to figure out how to get my daemon to reconnect when my web socket server goes down for some reason. I read over existing issues, and saw in #580 the instruction that I should open a new issue if I seem to be having problems, so here I am. 😄

    I am using the example code in the project README and the only change that I have made is to switch the web socket URL to "ws://localhost:3000/ws" which is where I am running my server as I develop it. When the server is up, everything works great. But as soon as I shut down the server, the Python script immediately exits with the following stack trace:

    Traceback (most recent call last):
      File "/Users/james/git/shade/src/python/client.py", line 31, in <module>
        rel.dispatch()
      File "/usr/local/lib/python3.9/site-packages/rel/rel.py", line 205, in dispatch
        registrar.dispatch()
      File "/usr/local/lib/python3.9/site-packages/rel/registrar.py", line 72, in dispatch
        if not self.loop():
      File "/usr/local/lib/python3.9/site-packages/rel/registrar.py", line 81, in loop
        e = self.check_events()
      File "/usr/local/lib/python3.9/site-packages/rel/registrar.py", line 232, in check_events
        self.callback('read', fd)
      File "/usr/local/lib/python3.9/site-packages/rel/registrar.py", line 125, in callback
        self.events[etype][fd].callback()
      File "/usr/local/lib/python3.9/site-packages/rel/listener.py", line 108, in callback
        if not self.cb(*self.args) and not self.persist and self.active:
      File "/usr/local/lib/python3.9/site-packages/websocket/_app.py", line 349, in read
        op_code, frame = self.sock.recv_data_frame(True)
      File "/usr/local/lib/python3.9/site-packages/websocket/_core.py", line 401, in recv_data_frame
        frame = self.recv_frame()
      File "/usr/local/lib/python3.9/site-packages/websocket/_core.py", line 440, in recv_frame
        return self.frame_buffer.recv_frame()
      File "/usr/local/lib/python3.9/site-packages/websocket/_abnf.py", line 338, in recv_frame
        self.recv_header()
      File "/usr/local/lib/python3.9/site-packages/websocket/_abnf.py", line 294, in recv_header
        header = self.recv_strict(2)
      File "/usr/local/lib/python3.9/site-packages/websocket/_abnf.py", line 373, in recv_strict
        bytes_ = self.recv(min(16384, shortage))
      File "/usr/local/lib/python3.9/site-packages/websocket/_core.py", line 524, in _recv
        return recv(self.sock, bufsize)
      File "/usr/local/lib/python3.9/site-packages/websocket/_socket.py", line 122, in recv
        raise WebSocketConnectionClosedException(
    websocket._exceptions.WebSocketConnectionClosedException: Connection to remote host was lost.
    

    Is there anything I can do different to enable this great-sounding automatic reconnection behavior, or do I have to write my own code to try to relaunch this daemon whenever it exits?

    opened by brunchboy 21
  • cross-platform aync multi-client solution

    cross-platform aync multi-client solution

    I modified WebSocketApp.run_forever(), replacing the select() loop with rel.read() event registration. Info on rel here:

    https://github.com/bubbleboy14/registeredeventlistener

    This addresses platform issues (e.g. https://github.com/websocket-client/websocket-client/pull/293/files) by choosing the fastest async method (such as epoll, poll, kqueue, select) supported by the system.

    Furthermore, one can now run more than one WebSocketApp by simply passing no_dispatch=True to run_forever() as many times as are necessary (n-1 times -> all but the last, which will finally start the event loop).

    opened by bubbleboy14 20
  • 'socket' object has no attribute 'pending'

    'socket' object has no attribute 'pending'

    Hi,

    Since version 1.4.0 we have been experiencing an issue using WebSocketApp and obtaining this error:

    'socket' object has no attribute 'pending'
    

    Downgrading to an older version, such as pip install websocket-client==1.3.3, resolves the problem.

    Example code:

    #!/usr/bin/env python3
    import websocket
    import ssl
    import json
    
    message_to_send = {"key": "value"}
    
    def on_message(ws, message):
        print("response: " + str(message))
        ws.close()
    
    def on_error(ws, error):
        print("error: " + str(error))
    
    def on_close(ws, *args, **kwargs):
        print("Closed")
    
    def on_open(ws):
        msg = json.dumps(message_to_send)
        print(msg)
        ws.send(msg)
    
    ws = websocket.WebSocketApp(
        "ws://localhost:8089/",
        on_message=on_message,
        on_error=on_error,
        on_close=on_close,
    )
    ws.on_open = on_open
    ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE})
    

    Some example debugging information:

    --- request header ---
    GET / HTTP/1.1
    Upgrade: websocket
    Host: localhost:8089
    Origin: http://localhost:8089
    Sec-WebSocket-Key:
    Sec-WebSocket-Version: 13
    Connection: Upgrade
    
    -----------------------
    --- response header ---
    HTTP/1.1 101 Switching Protocols
    Connection: Upgrade
    Sec-WebSocket-Accept:
    Server: server
    Upgrade: websocket
    -----------------------
    
    websocket connected
    'socket' object has no attribute 'pending' - goodbye
    error: 'socket' object has no attribute 'pending'
    

    Have searched online/FAQ etc and cannot see anything related to the issue.

    Many thanks for the help.

    opened by j-linds 19
  • AttributeError: 'NoneType' object has no attribute 'connected'

    AttributeError: 'NoneType' object has no attribute 'connected'

    My on_open callback sends some data to the server when the connection is established. Usually, it works, but some times i receive the following error.

    The following exception is captured in the on_error callback.

    Traceback (most recent call last):
      File "[...]/python3.5/site-packages/websocket/_app.py", line 278, in run_forever
        dispatcher.read(self.sock.sock, read)
      File "[...]/python3.5/site-packages/websocket/_app.py", line 48, in read
        while self.app.sock.connected:
    AttributeError: 'NoneType' object has no attribute 'connected'
    
    

    I'm afraid I cannot provide more useful data to reproduce the problem as it appears to be raised randomly.

    opened by josepalos 19
  • Release 1.0.0 caused an AttributeError: 'NoneType' object has no attribute 'settimeout' on websocketapp.close()

    Release 1.0.0 caused an AttributeError: 'NoneType' object has no attribute 'settimeout' on websocketapp.close()

    Hi,

    With the 1.0.0 release, a major update in WebSocket.close() function in _core.py was done and it causes an AttributeError when we try to close WebSocketApp.

    This issue is a side effect of an update in websocket-client/_core.py file

    Initially, the code of WebSocket.close() function was:

        def close(self, status=STATUS_NORMAL, reason=six.b(""), timeout=3):
                ....
                try:
                    ....
                    self.sock.settimeout(sock_timeout)
                    self.sock.shutdown(socket.SHUT_RDWR)
                except:
                    pass
    

    Now, exceptions are no more catched ... except for Mac OS (!?!) :

        def close(self, status=STATUS_NORMAL, reason=bytes('', encoding='utf-8'), timeout=3):
                ....
                try:
                    ....
                    self.sock.settimeout(sock_timeout)
                    self.sock.shutdown(socket.SHUT_RDWR)
               except OSError:  # This happens often on Mac
                    pass
                except:
                    raise
    

    I found one reason that could cause self.sock set to None : when frame is decoded (line 479: frame = self.recv_frame()), if there is any error during decoding, the web socket is closed and set to None:

        def _recv(self, bufsize):
            try:
                return recv(self.sock, bufsize)
            except WebSocketConnectionClosedException:
                if self.sock:
                    self.sock.close()
                self.sock = None
                self.connected = False
                raise
    

    I suppose our issue isn't new but was hidden by the try / except pass until 1.0.0 release.

    Could you test self.sock before trying to set timeout and call shutdown() ?

    opened by PFaurel 16
  • License preferences for possible migration?

    License preferences for possible migration?

    This project experienced some messy license switches (see issue #526 for more details) and it would be nice to get all contributors to agree to a final change of open source license. I am no expert on the pros/cons of different open source licenses, so I opened this issue to initiate discussions around which license users would most prefer this code to be under. Assuming that the LGPL v2.1 license is not the preferred choice and an alternative consensus is reached, I can begin the process of trying to get all contributors to agree to this switch.

    So which license do you think would enable the most flexibility for this project's future?

    opened by engn33r 16
  • SSLV3_ALERT_HANDSHAKE_FAILURE error on Mac

    SSLV3_ALERT_HANDSHAKE_FAILURE error on Mac

    Hi

    I'm using version 1.4.2

    When i try to connect wss i am getting "SSLV3_ALERT_HANDSHAKE_FAILURE" error: ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)

    opened by atillayurtseven 3
  • When create a WebSocketApp with skip_utf8_validation=True, still decoding received frame as utf-8

    When create a WebSocketApp with skip_utf8_validation=True, still decoding received frame as utf-8

    Hi,

    Despite skip_utf8_validation set to True, why WebSocketApp.read() function still decoding text frame as utf-8 ?

    ` def read(): if not self.keep_running: return teardown()

            try:
                op_code, frame = self.sock.recv_data_frame(True)
            except (WebSocketConnectionClosedException, KeyboardInterrupt) as e:
                if custom_dispatcher:
                    return handleDisconnect(e)
                else:
                    raise e
            if op_code == ABNF.OPCODE_CLOSE:
                return teardown(frame)
            elif op_code == ABNF.OPCODE_PING:
                self._callback(self.on_ping, frame.data)
            elif op_code == ABNF.OPCODE_PONG:
                self.last_pong_tm = time.time()
                self._callback(self.on_pong, frame.data)
            elif op_code == ABNF.OPCODE_CONT and self.on_cont_message:
                self._callback(self.on_data, frame.data,
                               frame.opcode, frame.fin)
                self._callback(self.on_cont_message,
                               frame.data, frame.fin)
            else:
                data = frame.data
                **if op_code == ABNF.OPCODE_TEXT:
                    data = data.decode("utf-8")**
    

    ` Reason : I receive another text encoding frame ('ISO-8859-1') and I want to decode it by myself

    opened by PFaurel 4
  • web-socket client long-lived connection send AND  receive messages

    web-socket client long-lived connection send AND receive messages

    Describe the bug I want to create a web-socket client that connect so a server and listen to Incoming messages but also is able to send message so the same connection. If i use run_forever() i can receive messages but it is blocking so i can not send messages. When i use a dispatcher and do not use rel.dispatch() then i can send messages but not receive ones.

    To Reproduce Code snippet to reproduce the behavior:

    URL = "WSXXXX"
    ws = websocket.WebSocketApp(URL,
            on_open=on_open,
            on_message=on_message,
            on_error=on_error,
            on_close=on_close
        )
    ws.run_forever()
    
    while True:
        ws.send('hallo')
        time.sleep(5)
    

    So how can i use the nice on_message callback AND send message to the same web-socket?

    Environment:

    • Python version: 3.10.6
    • Virtual Env: virtualenv,
    • OS: Ubuntu
    opened by Skill3t 1
  • Suggestion: Add ability to send ping_payload with different opcode

    Suggestion: Add ability to send ping_payload with different opcode

    I've found the run_forever function to be extremely useful in handling sending periodic ping messages. However, I'm faced with a websocket server which only responds to a specific ping payload sent with opcode=2. It then returns its "pong" over opcode=2. In my use case, I don't particularly care about receiving the pong, so have set ping_timeout=None. However, I would appreciate the option to send ping_payload with opcode=2 rather than the default opcode=9.

    My alternative is writing async code to handle sending the ping with something like ws.send(ping_payload, opcode=2), but the run_forever function suits me perfectly otherwise.

    I appreciate this is a somewhat niche use case, so I understand if this functionality is deemed unnecessary or if it goes against best practices to implement.

    enhancement 
    opened by bjebert 0
  • When using ping_interval, if the connection drops and reconnects, the pinging stops

    When using ping_interval, if the connection drops and reconnects, the pinging stops

    When making a connection for the first time, specifying a ping, the ping thread is started before setSock() is called in run_forever():

            if ping_interval:
                event = threading.Event()
                thread = threading.Thread(
                    target=self._send_ping, args=(ping_interval, event, ping_payload))
                thread.daemon = True
                thread.start()
    
            setSock()
    

    However, after a disconnection, setSock() is called again to reconnect, but the ping thread is no longer running as it was killed by the disconnection. A new thread needs to be started.

    I have fixed this by removing the thread code above from before the initial setSock() call, and putting it instead at the start of the setSock() function, which now looks like this:

            def setSock(reconnecting=False):
                nonlocal thread
                if not (thread and thread.is_alive()):
                    if ping_interval:
                        event = threading.Event()
                        thread = threading.Thread(
                            target=self._send_ping, args=(ping_interval, event, ping_payload))
                        thread.daemon = True
                        thread.start()
                self.sock = WebSocket(
                    self.get_mask_key, sockopt=sockopt, sslopt=sslopt,
                    fire_cont_frame=self.on_cont_message is not None,
                    skip_utf8_validation=skip_utf8_validation,
                    enable_multithread=True)
            ...
    

    The thread therefore gets started for the initial connection, and also for subsequent reconnections.

    Julian

    opened by juliangall 2
Releases(v1.4.2)
Benchmark a WebSocket server's message throughput ⌛

📻 WebSocket Benchmarker ⌚ Message throughput is how fast a WebSocket server can parse and respond to a message. Some people consider this to be a goo

Andrew Healey 24 Nov 17, 2022
Burgeramt-appointments-websockets - Fetch Bürgeramt appointments and broadcast them via websockets

Bürgeramt appointment finder This server looks for Bürgeramt appointment every f

74 Dec 19, 2022
WebSocket client for Python

websocket-client The websocket-client module is a WebSocket client for Python. It provides access to low level APIs for WebSockets. All APIs are for s

3.1k Jan 02, 2023
Python socket.io server implementation on top of Tornado framework

TornadIO2 Disclaimer Unfortunately, Socket.IO 0.8 branch is abandoned, there are huge amount of bugs and nothing getting fixed. I would suggest to loo

Serge S. Koval 526 Oct 03, 2022
image stream publish server over websocket

Image Stream Push Server 简介 通过浏览器网页实时查看图像处理结果。 环境 运行程序需要安装一下python依赖: tornado: 用于创建http及websocket服务; opencv-contrib-python: 用于图像数据源获取及图像处理。 使用 进入到src目

MrError404 1 Nov 04, 2021
alien.py - Python interface to websocket endpoint of ALICE Grid Services

alien.py - Python interface to websocket endpoint of ALICE Grid Services Quick containerized testing: singularity

Adrian Sevcenco 6 Dec 14, 2022
Minecraft WebSocket

Minecraft-WebSocket Pythonでマインクラフトと通信します。 紹介動画 推奨設定 Minecraft Windows Edition (Education Edition) 1.17 以上 Python 3系(3.8.2で動作確認済み) 必要なモジュール ・asyncio ・w

Roii.py 2 Jul 07, 2022
Async (trio) KuCoin minimal REST API + Websocket

Minimal Async KuCoin REST API + WebSocket using trio Coded by π ([email protected] TG: @p

Pi 2 Oct 23, 2022
AWS API Gateway Websocket Asynchronous Notifications Pusher

AWS API Gateway Websocket Asynchronous Pusher Fast AWS API Gateway websockets notifications' pusher using Python AsyncIO for managing asynchronous and

OBytes 5 May 15, 2022
JINS MEME(2021年モデル)のJINS MEME LoggerをPythonのWebSocketサーバーで受信するサンプル

JINS-MEME-Python-WebSocketServer-Sample JINS MEME(2021年モデル)のJINS MEME LoggerをPythonのWebSocketサーバーで受信するサンプルです。 Logging Data 以下のデータに対応しています。 各データの定義はJIN

KazuhitoTakahashi 19 Apr 29, 2022
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Django 5.5k Jan 03, 2023
WebSocket and WAMP in Python for Twisted and asyncio

Autobahn|Python WebSocket & WAMP for Python on Twisted and asyncio. Quick Links: Source Code - Documentation - WebSocket Examples - WAMP Examples Comm

Crossbar.io 2.4k Jan 04, 2023
A Security Tool for Enumerating WebSockets

STEWS: Security Testing and Enumeration of WebSockets STEWS is a tool suite for security testing of WebSockets This research was first presented at OW

175 Jan 01, 2023
This websocket program is for data transmission between server and client. Data transmission is for Federated Learning in Edge computing environment.

websocket-for-data-transmission This websocket program is for data transmission between server and client. Data transmission is for Federated Learning

9 Jul 19, 2022
Synci - Learning project to create a websocket based client server messaging application

Synci Learning project to create a websocket based client server messaging appli

2 Jan 13, 2022
Django Channels HTTP/WebSocket server

daphne Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP, developed to power Django Channels. It supports automatic negotia

Django 1.9k Dec 31, 2022
An IPC based on Websockets, fast, stable, and reliable

winerp An IPC based on Websockets. Fast, Stable, and easy-to-use, for inter-communication between your processes or discord.py bots. Key Features Fast

Black Thunder 5 Aug 09, 2022
Python framework for AsyncAPI-documented Websocket, PubSub, and other async constructs

asyncapi-eventrouter Work in Progress Write Python code for Event-Driven Architectures! The asyncapi-eventrouter prototype library creates Websocket,

noteable 4 Jan 27, 2022
Elegant WebSockets for your Flask apps.

Flask-Sockets Elegant WebSockets for your Flask apps. Simple usage of route decorator: from flask import Flask from flask_sockets import Sockets app

Heroku Python Team 1.7k Dec 26, 2022
Discord.py Connect to Discord voice call with websocket

Discord.py Connect to Discord voice call with websocket

WoahThatsHot 3 Apr 22, 2022