soc

A lightweight websocket micro framework


Keywords
websocket, micro, framework, micro-framework, python, websockets
License
MIT
Install
pip install soc==0.0.1

Documentation

Soc - A Python websocket micro-framework

Work in progress

from soc import Soc, jsonify, Request


def create_app() -> Soc:

    app: Soc = Soc()

    @app.route("/foo")
    def foo(request: Request):
        return jsonify({"hello": "world"})

    return app


if __name__ == "__main__":
    app: Soc = create_app()
    app.run(host="localhost", port=8765)