Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:Python': 0.06; 'python3': 0.07; '"__main__":': 0.09; '__name__': 0.09; 'setup.py': 0.09; 'url:github': 0.09; 'way:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'birds': 0.16; 'extensible': 0.16; 'main():': 0.16; 'python3.': 0.16; 'wrote:': 0.18; 'app': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; 'header:User- Agent:1': 0.23; 'focusing': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'first,': 0.26; 'header:In-Reply- To:1': 0.27; 'database,': 0.30; "i'm": 0.30; 'anyone': 0.31; 'interface': 0.32; 'fri,': 0.33; 'basic': 0.35; 'accessible': 0.36; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'two': 0.37; 'branch': 0.38; 'does': 0.39; 'even': 0.60; 'most': 0.60; 'tips': 0.61; 'provide': 0.64; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'jul': 0.74; 'lan.': 0.84; 'plugins.': 0.84; '2013,': 0.91 Date: Tue, 30 Jul 2013 16:14:13 -0500 (CDT) From: Wayne Werner X-X-Sender: wayne@gilgamesh To: Rui Maciel Subject: Re: Newbie: Python 3 and web applications? In-Reply-To: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 48 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375218879 news.xs4all.nl 15950 [2001:888:2000:d::a6]:51872 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51608 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