user authentication interface in python

scn regnivon at
Tue Jun 17 19:10:33 CEST 2003

Gerhard Häring <gh at> wrote in message news:<mailman.1055513184.30725.python-list at>...
> scn wrote:
> > hello.  does anyone have a high-level example of how to implement
> > 'secure' user authentication interface for web users in python.
> > 
> > i am in the process of designing a simple web application that
> > requires user authentication and i remembered that php typically held
> > system authentication information in a separate file and included this
> > file in the main interface script.
> What's the advantage of this approach? The only pro I see is that if you 
> misconfigure your webserver so the .php file is rendered as-is without 
> processing through PHP the user won't see the password.
> > is there a similar convention or methodology in python for
> > accomplishing the same idea? [...]
> Sure, you can
> a) import a module from elsewhere
> or
> b) open the file using file("/path/to/file") and read it
> I still don't see why you'd want to store user information like this.
> FWIW, I typically do authentication either using Apache directly or 
> store login and password in a PostgreSQL database.

thanks for responding. what i wanted to achieve was keeping the
database access information in a separate file, similar to the
convention i've seen used in php.  the db connection, username and
password information was typically stored in an '' file
and included in the main script using the 'include' statement. i
suspect i need to learn a little more about building web applications
in python and try to think 'python' rather than 'php'? i'll think my
questions through a little better next time. thank you. scn

More information about the Python-list mailing list