Hacker News new | past | comments | ask | show | jobs | submit login
Try the Flask web framework in your Browser (ep.io)
91 points by DasIch on Sept 30, 2011 | hide | past | favorite | 31 comments



I don't have a twitter account and I'm not going to sign up just to try something out. I don't want to be mean, but the point of a "try it in your web browser" is that the barrier to entry is low. Twitter makes it high again.


I was all ready to sign up as well, I do have a twitter account and I was still put off.

My twitter account is, like my facebook account and my google+ account, private to those whom I know and trust. why would I give that information to some random website?


I didn't sign up for this either (for same reason as you), and because I suspect some viral marketing at work.

My guess is that it is a version of the Flask-OAuth extension sample app, found here:

http://packages.python.org/Flask-OAuth/

Flask is really great, BTW.


It's just for authentication because you generate your own ep.io apps (I think that's what it's doing at least). If you look at the requested permissions, you will see that it doesn't need to read or write any of your data.


Why not just generate a unique token for each user then?


"This application will be able to:

    Read Tweets from your timeline.
    See who you follow.
"

You know what? Fuck that.

If you don't want to handle auth, use something that you won't use to spy on me, like https://browserid.org/

Otherwise, forget it.


My reaction: Awesome!! I'm so glad others can now see the simplicity of Flas... Twitter?

Big fan of Flask, so I do hope there will be other methods of authentication (or none at all until you want to save your work).

EDIT

Oh well, signed up anyway. The interface is very sleek and well designed. It demonstrates how simple and light weight it is very well. Great job.

FEEDBACK

Took me a minute to find the "list of files" dropdown. Perhaps combine that and the associated buttons at the top with the "current file" label at the top.

A slider instead of a static separator would be helpful. Especially if you want to see more of your site when using a wide monitor.

Also, I (again) really like the design. It's fun. And like that you can visit and share your site, even if it is temporary. Ep.io should absolutely invest in this. It's quite wonderful.


> Big fan of Flask, so I do hope there will be other methods of authentication (or none at all until you want to save your work).

Sorry for that. I thought it would be the easiest way for people to sign up but I guess I will add OpenID as well.


How about an authentication that doesn't require a 3rd party service?


I've never played around with Flask before this and now I'm seriously considering migrating my project from Django to this.

I like that it's more lightweight and flexible than Django, but there appear to be some tradeoffs as well. Has anyone successfully migrated a project from Django to Flask? Are you happy with your decision? What things do you like/dislike about it compared to Django?


I've moved an in-progress project from django to flask, and am loving it. IMO, django has too much boilerplate and requires too much code to get things done. I seem to find myself digging through documentation more than writing code. With flask, I'm implementing complete features in hours rather than days.

Django is awesome, don't get me wrong. Maybe I just need more experience with it.


I've looked at flask briefly, but it strikes me that a bare-bones django project is every bit as lightweight as a bare-bones flask project(i.e. use what you need). That said, if a flask project grows beyond a trivial app, don't you necessarily need to rebuild(or seek out) much of the great functionality that django already provides?


I find the same thing with Django, btw. Once a project grows beyond a (slightly less) trivial app, that is, at some point your project is going to want to do something difficult and/or unique, you wander outside of the wonderful things that Django provides, and you find yourself needing to build or seek out complex functionality by hand again, and sometimes having Django work against you.

At least, that's my experience.

So next time, for a not-too-large scale project, I will indeed try a more barebones framework such as Flask, to see if it matters much.

Django does get you off to a running start, but as soon as you want something it can't do, you find yourself clawing through its entrails again.


Yes, that's the idea. Flask itself provides core functionality and if you need database access, authentication, authorization, OAuth, OpenID or whatever else you might need you use an extension which provides that.

The great thing about extensions is that Flask has the concept of approved extensions, these have been reviewed by Flask developers and have to follow certain guide lines[1].

Django gives you more features, Flask is more flexible. Both have their up- and downsides so it comes down to personal preference which you choose.

[1]: http://flask.pocoo.org/docs/extensiondev/#approved-extension...


A screenshot for those who don't want to give out their twitter: http://cl.ly/0j2m0Y1K3M0m3T2p0I3C/o

It's pretty nifty, on the left side you can edit your files (at the bottom is a dropdown to switch between them), the right side automatically reloads.


You've accidentally left one occurrence of your username unredacted, in that welcome blurb :)


> RuntimeError: Second simultaneous read on fileno 13 detected. Unless you really know what you're doing, make sure that only one greenthread can read any particular socket. Consider using a pools.Pool. If you do know what you're doing and want to disable this error, call eventlet.debug.hub_multiple_reader_prevention(False)

I guess it's getting pounded. I got to a Twitter auth screen once and backed out. Too many sites ask for lifetime access to Twitter/Facebook/etc. and I don't trust what they'll do with it years down the line.


Pardon me for being dense with respect to such things, but does Flask work with Google App Engine, being a WSGI framework?


Yes it does. Take a look at this tutorial: http://f.souza.cc/2010/08/flying-with-flask-on-google-app-en...

And here's a skeleton project to get you going: http://github.com/blossom/flask-gae-skeleton


Very nice. Thanks for the resources!


If you need something like Flask for GAE, you will probably find this[1] interesting. It convinced me to use webapp2 over Flask. Webapp2 is actually replacing Google's implementation with the upcoming Python 2.7 release[2].

[1]: http://stackoverflow.com/questions/6774371/flask-vs-webapp2-...

[2]: https://sites.google.com/site/gaepython27testing/


It would be nice if there was a possibility of creating and using a database. As far as I know (and I don't know much, mind you), using the console is either necessary, or makes it much easier, to create, say, an sqlite3 db. Another feature request would be the ability to upload images or static resources but I get how space and security can be an issue in that case. Oh and one last tidbit, "guarnatee" is not a word (welcome.html) ;)

Other than that, I really appreciate the simplicity of it all, the ability to download the package after you're done especially. Great job, mitsuhiko!


Getting this error:

      listener = BaseHub.add(self, evtype, fileno, cb)
    File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 126, in add
     evtype, fileno, evtype))
  RuntimeError: Second simultaneous read on fileno 17 detected.  Unless you really know what you're doing, make sure that only one greenthread can read any particular socket.  Consider using a pools.Pool. If you do know what you're doing and want to disable this error, call eventlet.debug.hub_multiple_reader_prevention(False)


From the author of the Flask:

    <mitsuhiko> If you get exceptions randomly then that's because my ep.io account gets limited. I have like 30 apps by now xD


This is pretty slick - its got the same feel as jsFiddle.

Working this into the Flask docs (which are already excellent) would be interesting. Or doing one of the guided tutorials like http://mongly.com/geo/index.


It won't let me use Firefox 8. It says I need a more modern Firefox. Hmm...


Firefox 8 isn't official so it probably sends a funky header back that identifies it as something else. Or their detection code is wrong.


According to WhatsMyUserAgent.com, Firefox 9.0a2 (alpha channel) looks like this:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a2) Gecko/20110930 Firefox/9.0a2

Doesn't look very weird.


I will check this, this is just for testing anyways.


What the hell does twitter integration have to do with an exposé on a language framework... sorry but nope looks like some sort of scraping scam to me.... remove the twitter oauth and I'll revisit it.


> Your browser does not support this application :-(

Not only are they blaming me for their failure to support all browsers via progressive enhancement, they aren't even telling me what their application actually does and why I should want to jump through their hoops.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: