samedii / aseprite-websockets-mock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mock stable diffusion api with websockets

Install environment

poetry install

Start the server

python -m app.main --reload

Client example

Using websocket-client.

import websocket


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


ws = websocket.WebSocket()
ws.connect("ws://localhost:8000/ws")
ws.send("hello")
print(ws.recv())
ws.close()

About


Languages

Language:Python 100.0%