A fast, ergonomic web framework for Tauraro — Python-like handlers, Rust-class performance, and automatic memory management.
from watax import App
from std.net.http_server import HttpConn
from std.encoding.json import JsonValue
def root(c: HttpConn):
c.send_text(200, "Hello, World!")
def greet(c: HttpConn):
mut name = c.request.get_param("name")
mut o = JsonValue.init_object()
o.read().obj_set("hello", JsonValue.init_str(name))
c.send_json_value(200, o) # watax owns + frees the whole tree
def main():
mut app = App.new()
.get("/", root)
.get("/greet/:name", greet)
app.listen_reactor_pool("127.0.0.1", 8080, 4)# watax is a LIBRARY — add it to your app's [deps] and build YOUR app:
taupkg build && ./myappA complete, runnable reference app lives in
example/app— from the repo root,taupkg build(a taupkg workspace) compiles watax + the app end-to-end and producesexample/app/watax_notes.
Builder calls chain fluently across lines (indented
.get(...)/.post(...)lines, leading- or trailing-dot). Prefer one binding + a chain over reassigningappon every call.
example/app is watax-notes, a small modular reference app that
exercises nearly the whole framework in one place — templates, static files, form
CRUD, a full JSON REST API (with JsonWriter), cookies, search, CORS,
rate limiting, chunked CSV, Server-Sent Events, and a WebSocket — with a live
browser demo of the streaming endpoints.
- Routing with path params (
/users/:id), wildcards, route groups, and mounts. - Responses: text · HTML · JSON (a streaming
JsonWriterwith no intermediate node tree, or aJsonValuetree) · templates · files · redirects · status-only, plus chunked streaming and Server-Sent Events. - Requests: path/query/form params, JSON bodies, cookies, headers, and multipart file uploads.
- Templates via templa
(
{% extends %}/{% block %}inheritance + filters). - Static files with content-type detection, caching, and SPA fallback.
- WebSockets (RFC 6455) and TLS (behind
-DTAURARO_TLS_OPENSSL). - Middleware: before/after hooks, CORS, rate limiting, request logging, signed-cookie sessions.
- Servers: thread-per-connection and an epoll/kqueue/WSAPoll reactor pool.
- Zero manual memory management in handlers — the framework and Tauraro's auto-drop free every per-request allocation.
Full guides — with examples, when to reach for each feature, how it works, and
best practices — live in docs/:
| Getting started | Routing |
| Requests | Responses |
| Middleware | Templates |
| Static files | JSON |
| WebSockets | Servers & deployment |
| Configuration | Testing |
| Memory model | Cheatsheet |
watax is built on the idea that a web framework should be simple to write and cheap to run.
You write plain handler functions; the compiler and framework carry the memory-management burden, so your code stays Python-clean while serving at native speed with a flat, predictable memory footprint.
#web-framework · #tauraro · #http ·
#json · #templates · #websockets ·
#middleware · #reactor · #zero-copy ·
#memory-safe
