Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51289 > unrolled thread
| Started by | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| First post | 2013-07-26 10:04 +0100 |
| Last post | 2013-07-30 16:14 -0500 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
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
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2013-07-26 10:04 +0100 |
| Subject | Newbie: 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]
| From | John Gordon <gordon@panix.com> |
|---|---|
| Date | 2013-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]
| From | Wayne Werner <wayne@waynewerner.com> |
|---|---|
| Date | 2013-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