Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

if you don't want fancy partial-page reloads and UI interaction, then just Flask + HTML also works.


Even better: Bottle.py; single-file dependency, includes routing and a simple templating engine.


Not sure if bottle is really "better" — it has different pros and cons compared to Flask, so whether it is better depends entirely on the usecase.

If you e.g. have a use case where your dependency-situation is one where you won't benefit from bottle being single-file (because you e.g. have a ton of other non-single file dependecies), then choosing it over the widely used Flask might not be show you any benefits at all.


I was responding to the request in the top comment for something simpler that can be used for weekend projects. In this case, Bottle.py is "better" in that it is more simple than Flask; not that Bottle.py as a web framework is objectively better than Flask.

For the record, I've used both, and Bottle is much faster to get started with. The docs are also much leaner.


Agree. Simple Flask and HTML gets you a long way and is easy to deploy and manage.


Might want to give this a try. Thanks for sharing!


Flask will take you pretty far. I'm not sure I would build a build a business around it, but it's the easiest thing I've found for just getting some code up on the web.

This tutorial is a pretty in-depth guide that incrementally adds more features to a flask app: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial...

By no means do you need to use everything in here, but I reference it from time to time. This is plenty:

    from flask import Flask, render_template

    app = Flask(__name__)


    @app.route("/")
    def index():
        return "<h1>hello world<h1>"


    @app.route("/foo")
    def foo():
        return render_template("foo.html", vars={"foo": "bar"})

    if __name__ == "__main__":
        app.run()


I work at a company pulling real cash, built mostly on Flask. Flask is one of the things I like the most about the stack.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: