klein
klein copied to clipboard
werkzeug + twisted.web
How do I test my klein apps, without using urllib or similar? Currently I'm considering adapting these [Twisted web tests](https://gist.github.com/bmuller/1873035) or [these](https://gist.github.com/preaction/5022465) ones.
Sometimes I have a structure like this: ``` @route("/a/", branch=True) def some_tree(request): return static.File("...") @route("/a/foo/bar/special_thing.txt") def some_overlaid_resource(request): return EventSource(...) ``` I'd really like that second route to show up if...
As of v10.0, `werkzeug.routing` raises a `RequestRedirect` (subclass of `HTTPException`) when you pass an URL without a trailing slash, trying to redirect it to the corresponding canonical URL with the...
Thus spoke @glyph, in March of 2012: "I want to take the example at the top of the readme, clip off the 'run' function at the bottom, then do ```...
In the following Klein application: ``` python from klein import route, run @route("/something", branch=True, strict_slashes=False) def something(request): return None run("localhost", 8080) ``` Then `GET /something/else` will result in a 200...
I'm working on generating some sphinx documentation from a klein application (loosely based on the autoflask directive from `sphinxcontrib-httpdomain`) but I need to access `_url_map` and `_endpoints` to get the...
app.py registers `KleinRequest` as an adapter from `twisted.web.server.Request` to `IKleinRequest`. It looks like the purpose of this is to create an extra object where some extra Klein-specific state can can...
See https://github.com/twisted/klein/issues/546. We have been running a similar patch on our enterprise production systems for about 6 months with no issues, and critically we have stopped getting issues on client...
Death to twisted loser slave devs. Death to those monkeys for naming their garbage programs with disgusting & racist & childish (I'm referring to that stupid 6-letter word which comes...
Death to twisted loser slave devs. Death to those monkeys for naming their garbage programs with disgusting & racist & childish (I'm referring to that stupid 6-letter word which comes...