Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 481 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 481 Bytes

socks

Socks (socket server) is a simple server framework, built only using the standard python library. Its syntax is strongly inspired by the microframework flask.

Basic usage

from socks import Socks, Response

app = Socks()

@app.route(path:str, methods:list[str]=["GET"])
def function(req):
    return Response(f"<h1>{req.method}</h1>", contentType="text/html")

For other things, look at the testserver.py file.