Skip to content

Make path optional in FastHTML.ws and APIRouter.ws, and modernize routing and style across examples and docs - #974

Merged
jph00 merged 1 commit into
mainfrom
pr/make-path-optional-in-fasthtml-ws-and-apirouter
Dec 4, 2026
Merged

jph00 merged 1 commit into
mainfrom
pr/make-path-optional-in-fasthtml-ws-and-apirouter

Conversation

@jph00

@jph00 jph00 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Allow @app.ws and @ar.ws to omit path so WebSocket routes default to the handler's function name and return a .to()-enabled LocFunc, matching @rt. Both bare @app.ws and @app.ws(conn=...) forms now work without repeating '/ws'.

Update demo/, examples/, tutorials, explanations, and migration guides to idiomatic bare @rt, query or form parameters with .to(...), app.static_route_exts(), and pathless @app.ws, keeping external webhooks, OAuth callbacks, and explicit path-parameter teaching examples intact. Also add missing fasthtml.pico imports (Group) in the six CRUD examples, fix a missing colon in the OAuth guide, apply chkstyle formatting across modules and notebooks, and exclude examples/pep8_app.py in pyproject.toml.

@jph00 jph00 added the enhancement New feature or request label Dec 4, 2026
@jph00
jph00 merged commit 08d94d4 into main Dec 4, 2026
1 check passed
@jph00
jph00 deleted the pr/make-path-optional-in-fasthtml-ws-and-apirouter branch December 4, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant