4 ms·
if you don't want fancy partial-page reloads and UI interaction, then just Flask + HTML also works.
by sixhobbits 5y ago
if you don't want fancy partial-page reloads and UI interaction, then just Flask + HTML also works.
- dannywarner 5y agoAgree. Simple Flask and HTML gets you a long way and is easy to deploy and manage.
- jacktheturtle 5y agoMight want to give this a try. Thanks for sharing!
- dfinninger 5y agoFlask 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-part-i-hello-world 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()
- bckr 5y agoI work at a company pulling real cash, built mostly on Flask. Flask is one of the things I like the most about the stack.
- toastercat 5y agoEven better: Bottle.py; single-file dependency, includes routing and a simple templating engine.
- atoav 5y agoNot 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.
- toastercat 5y agoI 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.