

A small fast and cute web framework in Python. - kghose
http://bottlepy.org/docs/dev/

======
skrubly
Although 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.)

~~~
stuartcw
I'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.

~~~
skrubly
Ah, I should mention that this is for a volunteer non-profit group. They
are/were falling into the 'spreadsheet as a database' trap, so this is the
first visible step to move off of that and onto something manageable.

The next stage is to get a slightly more comprehensive site going which will
keep track of contact information, attendance history, etc.

------
j2labs
People 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. :)

~~~
doublethink
The Play framework (java) also does this:

[https://github.com/playframework/play/blob/master/framework/...](https://github.com/playframework/play/blob/master/framework/src/play/mvc/Controller.java)

See "renderTemplate(String templateName, Map<String,Object> args)" for a good
example.

------
aaronmoodie
Bottle is great, not sure if this is really news though?

~~~
kghose
Apparently 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.

~~~
forza
<http://news.ycombinator.com/item?id=2773524>

~~~
kghose
Hmm. Shouldn't HN detect dupes and just upvote the orig? Odd.

~~~
pyre
It's also almost a year ago. It only does the dupe collapsing when within a
certain timeframe.

------
sixtypoundhound
I'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
Forgot 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.

------
peter_l_downs
At 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.

------
derwiki
If you like bottle but find yourself needing to write Ruby, check out Sinatra.

~~~
mark_l_watson
+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!

------
defnull
Thanks for the nice feedback :) I am defnull, the author of Bottle. Any
questions?

------
edwinnathaniel
Bottle vs Flask, who will win?

~~~
jessejmc
Bottle 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
Werkzeug 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).

------
heretohelp
I think Flask is a bit better known and tested these days.

One man's opinion (based on experience).

------
voxx
I 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.

------
druiid
Is it wrong that I use web.py? Should I feel dirty and start using bottle
instead? :P

