/ justapi / benchmarks / workloads_robyn.py
swadhinbiswas WIP save-point: production hardening, H3 removal, fmt gate, and accumulated phase work · 7/15/2026
2080d40
22 lines · 418 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Robyn workload matching justapi's benchmark endpoints (hello + echo)."""

from robyn import Robyn

app = Robyn(__file__)


@app.get("/hello")
def hello(request):
    return {"message": "hello, world"}


@app.post("/echo")
def echo(request):
    return request.json()


if __name__ == "__main__":
    import sys
    port = sys.argv[1] if len(sys.argv) > 1 else "8080"
    app.start(host="127.0.0.1", port=int(port))