7 ms·
A small fast and cute web framework in Python.
- aaronmoodie 14y agoBottle is great, not sure if this is really news though?
- latch 14y agonews to me.
- kghose 14y agoApparently no one has submitted the page before. I love bottle. I switched from RoR and never looked back. Of course I just use it for tiny basically desktop apps, where I just wanted to use the browser as an interface to avoid writing UI code.
- deleted 14y ago[deleted]
- forza 14y agohttp://news.ycombinator.com/item?id=2773524 http://news.ycombinator.com/item?id=2773524
- kghose 14y agoHmm. Shouldn't HN detect dupes and just upvote the orig? Odd.
- kjhughes 14y agoSyntactic differences in the URLs stump dupe detection: http://bottlepy.org/docs/dev/ http://bottlepy.org/docs/dev/ vs http://bottlepy.org/docs/dev/index.html http://bottlepy.org/docs/dev/index.html
- pyre 14y agoIt's also almost a year ago. It only does the dupe collapsing when within a certain timeframe.
- edwinnathaniel 14y agoBottle vs Flask, who will win?
- jsprinkles 14y agoWhy must there be a winner?
- ch0wn 14y agoI hope they will continue to coexist. Competition is great. I personally prefer Flask, mostly because I built my own little framework on top of Werkzeug before and know the code quite well. Also, I'm not a huge fan of the single-file approach, but this is just my personal preference.
- jessejmc 14y agoBottle supports Python 3 (as does CherryPy, Pyramid, and Tornado), while Flask currently doesn't. Depending on project requirements, this may or may not be important.
- jsprinkles 14y agoWerkzeug must support Python 3 before Flask can, and Armin has discussed Python 3 support here on HN before (and there's now a FAQ about it).
- srik 14y ago
- peter_l_downs 14y agoAt the top of the website, in very small text: Warning: This is a preview for Bottle-0.11.dev, which is not released yet. Switch to the latest stable release? Just something to be aware of.
- skrubly 14y agoAlthough I've been working with django daily for about the past six months, I used bottle for a small stand-alone 'desktop-like' application. I needed an easy, quick way to take roll call of a large group of people. We have a laptop with a projector but no internet access where the meeting occurs, so it had to be able to live on a Windows machine without network access. Bottle allowed me to pull together something in about five hours that uses sqlite for local storage of all of the participants names and whether they are present/absent and any notes. Previously, I was doing this on an inherited excel spreadsheet and it was very difficult for anyone else to read their name or any information. Now, it's a very simple HTML page with very large font that can be read from the back of the room. So, thank you bottle! I was able to develop on Linux and fairly painlessly deploy it to the Windows laptop, and it worked the first time. (That was scary... Rarely happens to me.)
- nosignal 14y agoIs this code that you can put online somewhere? This kind of thing would a) likely be really handy for lots of people and b) is the kind of thing I'd like to be able to make myself (using browser as a readymade UI), so having an existing reference would be helpful.
- stuartcw 14y agoI'm curious, how did you justify the return on investment of developing this? In most business situations, "Use Zoom to make the font bigger" would have been the boss reply. I almost always have to seed Version 1 as a stealth project or weekend project. Version 2 is more likely to be approved once it has been shown useful.
- druiid 14y agoIs it wrong that I use web.py? Should I feel dirty and start using bottle instead? :P
- j2labs 14y agoPeople interested in frameworks should read bottle's code. It has a neat feature where the request handling is built by sub classing exceptions. This allows request processing to terminate at any point by simply raising the handler. There is a global try/except that then renders the result. This mechanism is quite good for ensuring every request proper gets a response, though it also allows dodgy exception handling to interfere with processing. A discussion on the merits of exceptions themselves is beyond the scope of this comment. :)
- jimhoff11 14y agoI noticed that too. A truly clever hack. (I mean hack in a good way.)
- Cieplak 14y agohttps://github.com/defnull/bottle https://github.com/defnull/bottle
- doublethink 14y agoThe Play framework (java) also does this: https://github.com/playframework/play/blob/master/framework/src/play/mvc/Controller.java https://github.com/playframework/play/blob/master/framework/... See "renderTemplate(String templateName, Map<String,Object> args)" for a good example.
- vladsanchez 14y agoI wonder if BOTH (Bottle and Flask) will scale beyond its cuteness.
- derwiki 14y agoIf you like bottle but find yourself needing to write Ruby, check out Sinatra.
- mark_l_watson 14y ago+1 Sinatra is amazing convenient to use. In the last month I have written two REST style web services for a customer in Sinatra. I sometimes also use Sinatra instead of Rails for for simpler web apps. That said I installed Bottle and played with it - looks nice!
- sixtypoundhound 14y agoI've used it for a couple of projects and did a presentation on it at pyAtl this past March. Nice framework, easy to learn, simple to deploy, has adapters for many of the potential front end servers. If you want a copy of the presentation on the project, I posted it in the presentations area on my blog (marginhound).
- sixtypoundhound 14y agoForgot to add - one of the really nice things about using a microframework is that it is easy to assemble a "best of breed" solution using libraries from other frameworks.
- voxx 14y agoI like the tabs on the side, that's pretty cool. It would be really great on longer webpages where the user is doing even more scrolling. cool stuff, man.
- heretohelp 14y agoI think Flask is a bit better known and tested these days. One man's opinion (based on experience).
- defnull 14y agoThanks for the nice feedback :) I am defnull, the author of Bottle. Any questions?