3 ms·
Bottle's API easy to understand and has sane defaults. It also doesn't require any boiler-plate code and isn't saddled with any dependency baggage. I found it
by bonkabonka 15y ago
Bottle's API easy to understand and has sane defaults. It also doesn't require any boiler-plate code and isn't saddled with any dependency baggage. I found it trivial to wire in the Rocket web server as a replacement for WSGIref which had the added advantage I could wrap the startup in a small hunk of code I found over on the ActiveState forum to turn my app into a Windows service. Which, after half a day of beating on Flask, I wasn't able to figure out.
shrug
For me, it's all about fitness for purpose. In the end, the prototype consisted of four files (Bottle, Rocket, the Service wrapper and my code) with no other dependencies. Made it a lot easier for the overworked Windows admins to deploy. Flask was completely unsuitable for that.
- kenneth_reitz 15y agoFear of packages is a terrible thing. But, I see what you're saying. FWIW, there's a Flask-kitchensink project that lets you run it out of a single file, if you're so inclined.
- bonkabonka 15y agoThanks for the pointer to that project. Hopefully I won't have to do another of these off-the-cuff throwaways again (which means I won't have to leave the comfort-zone of virtualenv on Linux), but if I do, I now know where to find the kitchen sink. =)
- mcdonc 15y agoComments with critical, dogmatic hyperboles in them like this drive me nuts in general. Here are the hyperboles in this comment with the translations to normal English. - "saddled with any dependency baggage" == "has no dependencies" - "beating on Flask" == "using Flask" - "shrug" == "i didn't spend a lot of time on this" - "Flask was completely unsuitable for that" == "I was unwilling to ask for help from the people who use Flask" Additionally, Flask is also "easy to understand" and has "sane defaults", and it doesn't "require any boilerplate code" either. The context of the comment makes it seem like it's subpar on these things. I'm all for people pointing out fitness of purpose for various frameworks, but this comment might have been better phrased as "I use Windows. I happened to find a recipe that let me run Bottle as a Windows service. That made it easier for me to use Bottle. Also, I like being able to deploy without the use of packaging tools."
- bonkabonka 15y agoYou're right, I indulged in too much purple prose there. Sorry. Would you expand on what you meant by: > The context of the comment makes it seem like it's subpar on these things. What I intended to get across was that Bottle, being a single file at ~2700 lines, makes it convenient to scan the code to see exactly what it is doing (or not). It also doesn't require a lot of typing to wire a function to a URL and offers some nice syntactic sugar while doing so: you don't have to @route things you can @get them or @post them (it's probably my Java background that makes me think in terms of separate code paths for the different HTTP verbs). My take on a more detailed (and hopefully hyperbole-free) summation of my original post is: "Because this was a short timeframe prototype, they had no Linux VM available in the lab so I had to use Windows. I found a recipe that let me run Python stuff as a service which I was able to wrap around Bottle more quickly than I was able to with the other frameworks I tried. Because I was working on a machine that had no access out to the internet, I had no virtualenv and had to instead bundle all my stuff up by hand."
- mcdonc 15y agoWow, great way to take criticism! Thank you.