FAQ
Can I use sync functions?
No. Everything in RD is async by default, exceptrun.
Can I use Red Dwarf without Datastar?
No. I put something like 20 lines of helper code to help you use Datastar. Do you really want to waste all this good work? That's what I thoughtHow to serve static pages?
However you like. A straightforward way is to load them into memory.
with open(HTML_PATH / "index.html", "r", encoding="utf8") as f:
PAGE_HOME = f.read()
How does Red Dwarf handle static files?
We use etags and the browser does the rest.Does Red Dwarf provide database integrations?
No.How do I enable compression?
It's not in Red Dwarf yet, we recommend letting your reverse proxy handle it.How does logging work?
Withlogging.
You can access Red Dwarf logger from your main file, for example for silencing it:
import logging
logging.getLogger("red-dwarf").disabled = True
If you don't setup logging, no worries, it will just get ignored.
What Red Dwarf logs: Info: incoming requests, startup, restart, shutdown / Error: error in handling request (with traceback),