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


Groups > comp.lang.python > #51289 > unrolled thread

Newbie: Python 3 and web applications?

Started byRui Maciel <rui.maciel@gmail.com>
First post2013-07-26 10:04 +0100
Last post2013-07-30 16:14 -0500
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  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

#51289 — Newbie: Python 3 and web applications?

FromRui Maciel <rui.maciel@gmail.com>
Date2013-07-26 10:04 +0100
SubjectNewbie: Python 3 and web applications?
Message-ID<kstdma$pir$1@dont-email.me>
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?


Thanks in advance,
Rui Maciel

[toc] | [next] | [standalone]


#51306

FromJohn Gordon <gordon@panix.com>
Date2013-07-26 14:41 +0000
Message-ID<ksu1r4$jdk$1@reader1.panix.com>
In reply to#51289
In <kstdma$pir$1@dont-email.me> Rui Maciel <rui.maciel@gmail.com> writes:

> 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?

I recommend using a web framework such as Django or Pylons.  It's more to
learn, but frameworks handle a ton of low-level details for you and make
web development overall much easier.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

[toc] | [prev] | [next] | [standalone]


#51608

FromWayne Werner <wayne@waynewerner.com>
Date2013-07-30 16:14 -0500
Message-ID<mailman.5343.1375218879.3114.python-list@python.org>
In reply to#51289
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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web