Do anyone here use Python *embedded* in a database?
joshua at joshuakugler.com
Wed Aug 5 21:26:48 CEST 2009
Jonathan Fine wrote:
> I'm writing a talk that compares embed and extend, and wondered if
> anyone here ever used the Python *embedded* in a database server.
> Web frameworks (such as Django) use extend, to import an extension
> module that makes a connection to a database.
> If you have used embed, you might have consulted a page such as:
Yes, I've used plpython. We had a web application that had account creation
logic with salting, encryption, etc, on the passwords. We then wanted to
use the same accounts to log in to a Drupal site. Instead of trying to
replicate the logic in PHP, I just created a stored procedure with
plpython, and we overrode the drupal login check to call something
like "SELECT check_account(user, pass)" which would return 1 or 0 on
success or failure, respectively. Worked great.
More information about the Python-list