Newbie: Python 3 and web applications?

R

Rui Maciel

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
 
J

John Gordon

In said:
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.
 
W

Wayne Werner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top