Easy web session module with Python?

Discussion in 'Python' started by Johnathan Doe, Oct 14, 2004.

  1. Hi, I'm looking for an easy way to do web development with Python
    (session handling a-la ASP/JSP/PHP, that kind of thing). I've looked at
    PythonWeb.org but it has bugs because it's not tested on UNIX platforms
    it seems (I've created some patches and sent them to the author), and a
    quick browse through PyPI in the mature/stable packages doesn't reveal
    much hope, unless I've missed something. I've googled for session
    handling with Python, and it seems something called "pso" would be ok,
    but that is only mod_python as far as I know, and I may need something
    that works with cgi only hosts.

    I could write my own I suppose, but surely someone has done this before?
    Thanks for any tips!

    Johnathan
    Johnathan Doe, Oct 14, 2004
    #1
    1. Advertising

  2. Am Thu, 14 Oct 2004 13:50:09 +1000 schrieb Johnathan Doe:

    > Hi, I'm looking for an easy way to do web development with Python
    > (session handling a-la ASP/JSP/PHP, that kind of thing). I've looked at
    > PythonWeb.org but it has bugs because it's not tested on UNIX platforms
    > it seems (I've created some patches and sent them to the author), and a
    > quick browse through PyPI in the mature/stable packages doesn't reveal
    > much hope, unless I've missed something. I've googled for session
    > handling with Python, and it seems something called "pso" would be ok,
    > but that is only mod_python as far as I know, and I may need something
    > that works with cgi only hosts.


    Hi,

    You can use quixote. Use SessionPublisher. You need
    a mapping to store the data. A very simple but useable mapping
    is DirMapping which is in session_demo.cgi.

    This should work with every webserver, even with CGIHTTPServer from the
    standard library.

    HTH,
    Thomas
    Thomas Guettler, Oct 14, 2004
    #2
    1. Advertising

  3. Johnathan Doe wrote:

    > I could write my own I suppose, but surely someone has done this before?


    Session management is usually delivered as part of the
    application server. Zope, Webware, CherryPy, Quixote,
    Snakelets all have session management integrated into
    them.

    Standalone session modules are probably less used
    nowadays, here is one

    http://jonpy.sourceforge.net/session.html

    Istvan.
    Istvan Albert, Oct 14, 2004
    #3
  4. Johnathan Doe

    Alan Kennedy Guest

    [Johnathan Doe]
    > Hi, I'm looking for an easy way to do web development with Python
    > (session handling a-la ASP/JSP/PHP, that kind of thing). I've looked at
    > PythonWeb.org but it has bugs because it's not tested on UNIX platforms
    > it seems (I've created some patches and sent them to the author), and a
    > quick browse through PyPI in the mature/stable packages doesn't reveal
    > much hope, unless I've missed something. I've googled for session
    > handling with Python, and it seems something called "pso" would be ok,
    > but that is only mod_python as far as I know, and I may need something
    > that works with cgi only hosts.


    Ah, the perennial problems with python web software. You find something
    that is close to what you need, but it doesn't work on the platform or
    server you want, or it is so deeply embedded in some given framework
    that it not reusable outside that framework without a total rewrite.

    > I could write my own I suppose, but surely someone has done this before?


    Yes, this particular wheel has been reinvented before, again and again
    and again and ..........

    > Thanks for any tips!


    There is a new python web standard called WSGI that seeks to refactor
    out these kinds of reusable components and make them portable not just
    between servers but also between frameworks. WSGI refers to these as
    "middleware components".

    http://www.python.org/peps/pep-0333.html

    Although WSGI is still a standard in formation, I recommend that you at
    least take a look at it: by starting down a standardised road, you will
    at least have a chance to reuse other peoples components.

    I know of only one WSGI-compliant session module: the one written by Ian
    Bicking, principal author of WebWare. It is not fully released yet, i.e.
    it is only available from Ian's Subversion source code repository. You
    can find out how to access that here

    http://mail.python.org/pipermail/web-sig/2004-October/000941.html

    HTH,

    --
    alan kennedy
    ------------------------------------------------------
    email alan: http://xhaus.com/contact/alan
    Alan Kennedy, Oct 14, 2004
    #4
  5. Thanks guys for your replies! That was really helpful. Looks like I
    need a bit more time to study everything available for Python. You
    know, I wonder why Python doesn't have more "native" web development
    infrastructure like PHP. I think (abviously so do zillions of others)
    that Python is a beautiful and usable language, and I reckon that this
    issue of some kind of standard web dev module is holding back its
    popularity. It could be at least a few orders of magnitude more popular
    than PHP if it was heavy in web development infrastructure.

    Cheers
    Johnathan
    Johnathan Doe, Oct 15, 2004
    #5
  6. Am Fri, 15 Oct 2004 18:57:11 +1000 schrieb Johnathan Doe:

    > Thanks guys for your replies! That was really helpful. Looks like I
    > need a bit more time to study everything available for Python. You
    > know, I wonder why Python doesn't have more "native" web development
    > infrastructure like PHP. I think (abviously so do zillions of others)
    > that Python is a beautiful and usable language, and I reckon that this
    > issue of some kind of standard web dev module is holding back its
    > popularity. It could be at least a few orders of magnitude more popular
    > than PHP if it was heavy in web development infrastructure.



    Hi,

    Yes, it would be nice if there was *one* standard way.
    Quixote is very small and simple. Other libraries could
    be build on top of it, using the simple API.

    Thomas
    Thomas Guettler, Oct 15, 2004
    #6
  7. Johnathan Doe

    Jim Madsen Guest

    If you are looking for something like ASP/JSP/PHP be sure to look at
    Spyce. Spyce (Python Server Pages - PSP) embeds Python in HTML.

    http://spyce.sourceforge.net



    Johnathan Doe wrote:
    > Hi, I'm looking for an easy way to do web development with Python
    > (session handling a-la ASP/JSP/PHP, that kind of thing). I've looked at
    > PythonWeb.org but it has bugs because it's not tested on UNIX platforms
    > it seems (I've created some patches and sent them to the author), and a
    > quick browse through PyPI in the mature/stable packages doesn't reveal
    > much hope, unless I've missed something. I've googled for session
    > handling with Python, and it seems something called "pso" would be ok,
    > but that is only mod_python as far as I know, and I may need something
    > that works with cgi only hosts.
    >
    > I could write my own I suppose, but surely someone has done this before?
    > Thanks for any tips!
    >
    > Johnathan
    Jim Madsen, Oct 18, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    614
    Hazzard
    Apr 6, 2004
  2. Maric Michaud
    Replies:
    0
    Views:
    7,173
    Maric Michaud
    Jun 24, 2006
  3. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,236
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  4. Bruno Desthuilliers
    Replies:
    5
    Views:
    364
    Bruno Desthuilliers
    Aug 29, 2007
  5. Jason
    Replies:
    0
    Views:
    314
    Jason
    Feb 1, 2010
Loading...

Share This Page