Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django ORM for desktop application

Tags:

python

orm

django

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?

like image 498
geowa4 Avatar asked Jul 30 '09 13:07

geowa4


People also ask

Can Django be used for desktop apps?

Django is a web framework, you can't use it to make desktop apps (except if you count those Electron and similar abominations as desktop apps, but, even then, they don't use Django).

Does Django have a built in ORM?

One of the most powerful features of Django is its Object-Relational Mapper (ORM), which enables you to interact with your database, like you would with SQL.

Can you use Django ORM standalone?

Django doesn't have a separate package for it's ORM, but it's still possible to use it on its own.

Is Django ORM good?

The Django ORM is a very powerful tool, and one of the great attractions of Django. It makes writing simple queries trivial, and does a great job of abstracting away the database layer in your application. And sometimes, you shouldn't use it.


1 Answers

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.

like image 106
Alexander Ljungberg Avatar answered Oct 03 '22 10:10

Alexander Ljungberg