Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions frameworks/Python/robyn/app-const.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import multiprocessing
import os

from robyn import Response, Robyn
from robyn import Robyn
from robyn.argument_parser import Config


class SpecialConfig(Config):
class BenchConfig(Config):
def __init__(self):
super().__init__()
self.workers = 2
self.processes = ( os.cpu_count() * 2 ) + 1
self.workers = multiprocessing.cpu_count()
self.processes = 1
self.log_level = "WARN"


app = Robyn(__file__, config=SpecialConfig())
app = Robyn(__file__, config=BenchConfig())


@app.get("/plaintext", const=True)
Expand All @@ -23,9 +22,7 @@ def plaintext() -> str:

@app.get("/json", const=True)
def json() -> dict:
return {
"message": "Hello, world!"
}
return {"message": "Hello, world!"}


if __name__ == "__main__":
Expand Down
16 changes: 7 additions & 9 deletions frameworks/Python/robyn/app.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import multiprocessing
import os

from robyn import Response, Robyn
from robyn import Robyn
from robyn.argument_parser import Config


class SpecialConfig(Config):
class BenchConfig(Config):
def __init__(self):
super().__init__()
self.workers = 2
self.processes = ( os.cpu_count() * 2 ) + 1
self.processes = multiprocessing.cpu_count()
self.log_level = "WARN"


app = Robyn(__file__, config=SpecialConfig())
app = Robyn(__file__, config=BenchConfig())


@app.get("/plaintext")
Expand All @@ -23,10 +22,9 @@ def plaintext() -> str:

@app.get("/json")
def json() -> dict:
return {
"message": "Hello, world!"
}
return {"message": "Hello, world!"}


if __name__ == "__main__":
app.add_response_header("Server", "Roby1n")
app.add_response_header("Server", "Robyn")
app.start(host="0.0.0.0", port=8080)
4 changes: 2 additions & 2 deletions frameworks/Python/robyn/requirements-const.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
uvloop==0.19.0
robyn==0.62.0
uvloop==0.22.1
robyn==0.82.0
4 changes: 2 additions & 2 deletions frameworks/Python/robyn/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
uvloop==0.19.0
robyn==0.62.0
uvloop==0.22.1
robyn==0.82.0
2 changes: 1 addition & 1 deletion frameworks/Python/robyn/robyn-const.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12
FROM python:3.13-slim

ADD ./ /robyn

Expand Down
2 changes: 1 addition & 1 deletion frameworks/Python/robyn/robyn.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12
FROM python:3.13-slim

ADD ./ /robyn

Expand Down
Loading