tags:

views:

529

answers:

4

Recently, I have become increasingly familiar with Django. I have a new project that I am working on that will be using Python for a desktop application. Is it possible to use the Django ORM in a desktop application? Or should I just go with something like SQLAlchemy?

+2  A: 

Yes it is. The Commonsense Computing Project at the MIT media lab does that for ConceptNet, a semantic network. You can get the source here: http://pypi.python.org/pypi/ConceptNet/4.0b3

Andrew Farrell
+6  A: 

The Django people are sensible people with a philosophy of decoupling things. So yes, in theory you should be perfectly able to use Django's ORM in a standalone application.

Here's one guide I found: Django ORM as a standalone component.

Alexander Ljungberg
+4  A: 

I would suggest using SQLAlchemy and a declarative layer on top of it such as Elixir if you prefer a Django-like syntax.

jdriscoll
Also SQLAlchemy exposes a little more of the SQL design, making it a tiny bit easier to use 3rd party reporting tools.
S.Lott
A: 

I would suggest another ORM for a desktop application maybe SQLAlchemy or SQLObject. It i possible to use the django ORM but I think other ORM are a better ones if you are going to use them standalone.

Ferran