SQLAlchemy + Django... Again?

19 views
Skip to first unread message

Brantley Harris

unread,
Feb 29, 2008, 4:57:23 PM2/29/08
to django-d...@googlegroups.com
SQLAlchemy + Django

What's the status on this? If someone was to work on it, would it be
supported by the lords of Django?

Nicolas Steinmetz

unread,
Feb 29, 2008, 5:17:42 PM2/29/08
to django-d...@googlegroups.com
Brantley Harris wrote:

A quick search on django-users leads to this :
<htp://groups.google.com/group/django-users/browse_frm/thread/2bad0a013c81bc5e/10899fb5c7370116?lnk=gst&q=sqlalchemy#10899fb5c7370116>

Maybe it will answer your questions or some other searches will ;-)

Regards,
Nicolas
--
Nicolas Steinmetz
<http://www.steinmetz.fr/>
<http://www.unelectronlibre.info/>

Jacob Kaplan-Moss

unread,
Feb 29, 2008, 6:06:50 PM2/29/08
to django-d...@googlegroups.com
A short, overly snarky Django/SQLAlchemy FAQ:

Does Django support SQLAlchemy?

Define "support".

Um, can I use SQLAlchemy in Django?

Yes. ``import sqlalchemy`` works perfectly.

OK, but can I define models in Django but use SQLAlchemy to query them?

Perhaps. Try http://code.google.com/p/tranquil/.

OK, but can I define models in SQLAlchemy and have them automatically
translated into Django models so that stuff like the admin and generic view
still work?

No. Use inspectdb.

OK, but I really want the admin to Just Work™ with SQLAlchemy models.

Tough.

Will Django ever drop its ORM and use SQLAlchemy?

No.

Why not?

Why should it?

But Django's ORM is so weak!

Exactly.

So what's the SQLAlchemy branch then?

It was an experiment to see if anyone would work on Django/SQLAlchemy
integration. No one was interested, so the branch is defunct. Forget
it even existed.

Will Django ever provide some sort of automatic shim that translates between
Django models and SQLAlchemy models?

If I have to write it? No. If you write it? Maybe.

Jacob

Empty

unread,
Mar 1, 2008, 4:24:17 PM3/1/08
to django-d...@googlegroups.com
> Will Django ever provide some sort of automatic shim that translates between
> Django models and SQLAlchemy models?
>
> If I have to write it? No. If you write it? Maybe.
>

This is way premature and therefore I hesitate to even mention it, but
since the project is out in the open I will for the sake of those that
are interested. I've been working on a project on google code called
django-sqlalchemy (http://code.google.com/p/django-sqlalchemy/). At
this point I have it translated all of the model fields just fine.
I'm at the point of working out relationships (ForeignKey et. al.) .
So as you can tell it is really early on and certainly not anything
usable at this point. The work is largely based on the Elixir work,
which does a basic ActiveRecord pattern around sqlalchemy.

The purpose of the above is just to say that if you have an interest
in this and you're wanting to help it along, please contact me
directly. Otherwise, forget you ever heard anything. :)

Michael Trier
blog.michaeltrier.com

Thomas Guettler

unread,
Mar 3, 2008, 3:36:54 AM3/3/08
to django-d...@googlegroups.com
Brantley Harris schrieb:

> SQLAlchemy + Django
>
> What's the status on this? If someone was to work on it, would it be
> supported by the lords of Django?
>
>
Hi,

I like the django OR mapping very much. I never used SQLAlchemy. Why do you
think it is better?

Thomas

--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

Reply all
Reply to author
Forward
0 new messages