Simon Willison’s Weblog

Subscribe

Entries tagged sqlobject in Sep, 2003

Filters: Type: entry × Year: 2003 × Month: Sep × sqlobject × Sorted by date


SQLObject

My new favourite toy is SQLObject, an object-relational mapper which makes heavy use of Python’s special method names to create objects which can be used to transparently access and modify data in a relational database. I tried to write something like this in PHP once before and failed miserably, but SQLObject has such an elegant design that I’m just annoyed I didn’t find out about it sooner. Here’s some example code, adapted from the SQLOBject site:

[... 249 words]

Types

Years

Months

Tags