Before anyone gets to excited, I'm going to state up front that I have
*not* replaced django's ORM.

But I do have a small project that gives proof of concept for
automatically integrating SQL Alchemy ORM into the Django ORM. I've
been kicking the idea around for a bit, and after going through the
code I felt it was fairly hopeless to actually try and replace the
entire Django ORM with an sqlalchemy back end.

Major key points: (remember this is PoC so suggestions are indeed welcome)

SA = SQLAlchemy

1. SA creates its Table objects using reflection
2. SA ORM classes are dynamically created
3. SA ORM classes are directly importable via tranquil.models.*
4. I haven't got the ability to fully configure the setup of SA
tables, ORM classes, and mappers yet. This is planned, but I felt like
it wasn't important for PoC
5. Currently, SA reflection happens every time the server starts.
Obviously, caching this is on the ToDo list
6. All of this is provided by an external app with no patches to Django itself.

Project Page: http://code.google.com/p/tranquil/
Example views.py:
http://tranquil.googlecode.com/svn/trunk/proj_name/app_name/views.py

Basic usage:
Assuming tranquil is in the installed apps, just do:

from tranquil.models.app_name import ModelName

ModelName is the SQLAlchemy ORM object which means its pure SQLAlchemy
from there.

Any feedback is welcome. If there's enough interest I'll move forward
with filling out the corners.

Thanks,
Paul Davis

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to