Limits
What Cylinder does not do, on one page. Each line says what to use in its place, or where to read more.
What Cylinder leaves to other software
Async handlers and WebSockets. Cylinder is a WSGI framework. A handler is synchronous, and Cylinder does not handle WebSockets itself. It can run under an ASGI server, mounted beside async code that does. If you want async handlers throughout, a different framework will serve you better.
Templates, databases, and sessions. Cylinder includes none of them, and it brings no ORM, forms, or admin interface. You choose those libraries and pass them in. Composing an application shows how with Jinja2, SQLAlchemy, and a session.
Input validation. Nothing in a request is checked or converted. A handler checks what it uses, by itself or with a validation library.
An OpenAPI document. Cylinder does not write one from your code. A document that you write is a file like any other, and a file server sends it.
Protection against cross-site request forgery. A site that uses cookies for authentication and accepts form posts needs its own.
TLS, and a limit on the size of a request. Both belong to the proxy or the WSGI server. Cylinder does keep a hook from reading the body of a request that it has not let in.
What follows from the routing
A hook cannot opt out of the hooks above it. Every hook on the path runs. An exception for part of a section goes in the hook that covers the section.
A
.tree.handler answers for every path beneath it. It should turn down the ones it does not serve.A placeholder’s value is not converted or checked. It is a string: the segment of the path, as the server decoded it. A handler that wants a number checks for one.
A directory holds one placeholder.
{order_id}and{invoice_id}cannot share a directory, because nothing in a URL says which of them a value is for.A URL is served in one spelling.
/foo/bar/is not/foo/bar, and gets a404. See One spelling for each URL, and the hook that redirects a stray slash.No URL is built for you. Cylinder has no function that makes the URL of a page. The URL is the path of the file, so a link is written out.
What follows from running a handler file for each request
Handler files run on every request. They are checked on disk and run again each time. Keep work out of the top of a handler file, as Handlers explains.
A class that is defined in a handler file is a new class for each request.
picklecannot store an object of one, and an object that outlives its request is not an instance of the class that the next request builds. The same section says where such a class goes.A handler file cannot be imported. Its name has dots in it. Code that two handlers share goes in an ordinary module, and a test that calls a handler loads it by its path.
A module that a handler imports is loaded once. An edit to a handler file takes effect on the next request, and an edit to a module that it imports needs a restart.