views:

358

answers:

3

I love the abstract database API that comes with Django, I was wondering if I could use this (or something similar) to model, access, and manage my (postgres) database for my non-Django Python projects.

+9  A: 

What you're looking for is an object-relational mapper (ORM). Django has its own, built-in.

To use Django's ORM by itself:

If you want to use something else:

musicfreak
Exactly what I was looking for. Thanks!!
KeyboardInterrupt
No problem. :)
musicfreak
Simple, accurate, and straight to the point. Maybe add two lines on what's an ORM, for the heck of completeness? :)
NicDumZ
Sure, why not? Done. :)
musicfreak
+4  A: 

Popular stand-alone ORMs for Python:

They all support MySQL and PostgreSQL (among others).

Ayman Hourieh
+1: SQLAlchemy -- not quite as sexy as Django ORM, but easier to tie to an existing SQL database.
S.Lott
+1 on SQLAlchemy also. I don't see the point in using it in Django, due to the fine integration of its own ORM with its other parts. But SQLAlchemy specializes in exactly what you're looking for, and does that one thing extremely well.
ShawnMilo
A: 

I especially like SQLAlchemy with following tools:

They really remind me of ActiveRecord.

lispmachine