Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internally more like Flask? #26

Open
switham opened this issue Jun 15, 2013 · 0 comments
Open

internally more like Flask? #26

switham opened this issue Jun 15, 2013 · 0 comments

Comments

@switham
Copy link
Owner

switham commented Jun 15, 2013

Make the internal interfaces more like in Flask. In particular, where I have

    @route("/index.html")
    def foo(environ, start_response):
        blah blah

with PATH_INFO, PATH_INFO_MATCHED, and PATH_INFO_TAIL defined in environ, Flask has an object called app, and you do

    @app.route("/index.html")
    def foo():
        blah blah

and Flask has a different way of giving you what matches wildcards in the path. I'm not sure I like Flask's way of stuffing information in temporary globals, but I am uncomfortable with the way I'm doing things.

I do like the route belonging to an app object, and that you start the server for an app object.

So, do something elegant, and get closer to Flask's way if that's elegant. Is there an even-lighter-weight-pure-python knockoff of Flask?

How does Flask handle GET parameters and POST contents?

How does Flask manage cutting off the stack trace at the right point?

I don't like the uncertainty about what a handler is supposed to return (list? list-of-one-string? string? stream? static file?)

I will eventually want user code to output to what it sees as a stream, but which involves complicated AJAX piping with timeouts and keepalives, but then, at some point I will want graphics output in addition to the current stdout and stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant