Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51608

Re: Newbie: Python 3 and web applications?

Date 2013-07-30 16:14 -0500
From Wayne Werner <wayne@waynewerner.com>
Subject Re: Newbie: Python 3 and web applications?
References <kstdma$pir$1@dont-email.me>
Newsgroups comp.lang.python
Message-ID <mailman.5343.1375218879.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, 26 Jul 2013, Rui Maciel wrote:

> I'm currently learning Python, and I've been focusing on Python3.  To try to
> kill two birds with one stone, I would also like to learn the basics of
> writing small web applications.
>
> These web applications don't need to do much more than provide an interface
> to a small database, and they may not even be required to be accessible
> outside of a LAN.
>
> Does anyone have any tips on what's the best way to start off this
> adventure?

Take a look at the Python3 branch of Flask: 
https://github.com/mitsuhiko/flask.git

And the werkzeug webserver:
https://github.com/mitsuhiko/werkzeug.git


If you download these you can install them with:

> python setup.py install

(werkzeug first, then flask)


Here's the most basic webserver you can create that way:


from flask import Flask

app = Flask(__name__)

@app.route("/")
def main():
     return "Hello, Web!"

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



And yet flask is highly extensible with a lot of plugins.


HTH,
W

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Newbie: Python 3 and web applications? Rui Maciel <rui.maciel@gmail.com> - 2013-07-26 10:04 +0100
  Re: Newbie: Python 3 and web applications? John Gordon <gordon@panix.com> - 2013-07-26 14:41 +0000
  Re: Newbie: Python 3 and web applications? Wayne Werner <wayne@waynewerner.com> - 2013-07-30 16:14 -0500

csiph-web