FAQ

Can I use sync functions? No. Everything in RD is async by default, except run.
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 thought
How 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? With logging. 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),
Which responses can I send? Red Dwarf can return BAD_REQUEST, NOT_MODIFIED, NOT_FOUND, INTERNAL_SERVER_ERROR. And you can send OK and TEMPORARY_REDIRECT. These should be the only two codes you need. I haven't found the best way yet to return being a teapot.
Is it fast? I didn't test it yet. I wouldn't know where to start, maybe with the "cookie" benchmark I saw online, maybe using Locust. One thig I'm interested in is seing if using uvloop brings a significant boost.
Is Red Dwarf secure? Yes, thanks to Bitcoin-style encryption 👌 Jokes aside... I guess! The attack surface is rather small. You still have to do stuff like authentication and rate limiting by ourself, but that's by design.
Is there a test client? Not for the moment.
What is the test coverage of Red Dwarf? 0% for the moment.
Is there type matching on regex routes? No. They're strings.
Do you have signals or a pubsub mechanism? No.
What did you use for syntax highlighting on this site? The very good prism.js library.
Which fonts do you use on this website? Red Rose, Red Hat and Silkscreen.
Why did you create Red Dwarf? People liked Datastar's examples but kept asking for backend code. Because Datastar is backend agnostic, it was often a though question to answer. So I decided to create the simplest framework ever, in Python, to really hammer this down.
What are good resources on Red Dwarf? The code. Good and short.
<