Re: Traits with an ORM (sqlalchemy?) (Robert Kern)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Traits with an ORM (sqlalchemy?) (Robert Kern)

Fabio Pliger
>
> On Thu, 7 Jul 2011 11:39:14, Robert Kern <[hidden email]> wrote:
> On Thu, Jul 7, 2011 at 11:28 AM, Rob Chambers <[hidden email]>
> wrote:
> > Hi all,
> >
> > I'm coming up to speed on Traits and TraitsUI, and I'm really grateful to
> > the devs for putting out such a fantastic piece of software. It's really
> > been a joy learn.
> >
> > I was wondering, though, if you all have a strategy for integrating a
> > traits-based application with a conventional database. I've been very
> happy
> > with SQLAlchemy, and it seems to be a great match with Traits. There
> seems
> > to have been some real development, recorded in the two mailing list
> threads
> > and small projects linked below, but it seems that they haven't been
> updated
> > to work with SQLAlchemy 7, and I see no indication that they worked
> > reliably, anyways.
> They did work reasonably well (for the functionality that they
> implement) with older versions of SQLAlchemy. Unfortunately, it
> appears that some of the SQLAlchemy APIs have changed out from
> underneath us.


I've had the same issues some years ago with some packages that used
SQLAlchemy and Traits.. Back then we developed a package to decouple both
module and use them without mixing their *black* magic ( metaclasses and
related stuff ). The main idea is that you use your ORM classes as you like
and "guify" them only you when you want to edit and/or validate them using
traits powerful features. It also has support to create simple grid
applications to display ORM instances and ad functionality buttons to
manipulate data as you wish.  I've started refactoring that package to
publish it as an open source project. It's in an early stage because of the
tons of personal issues and events I've had lately. If you have some time
and want to play around it you can clone it from my bitbucket repo (
https://bitbucket.org/fpliger/alchemyui ). Right now it is an "as is"
package. I was working on test and documentation but had to drop everything
some weeks ago. Still you can take a look at the tutorial wich uses the
SQLAlchemy standard tutorial to auto generate forms and a list of the ORM
instances application. It's not ready for production yet but still you can
do nice things with it ( at least I hope to :) ).

If you try it please give me a feed back and I'll be happy to check if I can
improve it.

Fabio

--
Fabio Pliger
*linkedin*  http://it.linkedin.com/in/fabiopliger
*twitter*  http://twitter.com/b_smoke
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Traits with an ORM (sqlalchemy?) (Robert Kern)

Rob Chambers
Thanks for the info and the link to alchemyui. I got the examples working
after enabling the numpy support, and it looks great.

It seems like the solution for me is to keep using SQLAlchemy for data
storage, and to sync that data to Traits-based objects as-needed for GUI
support. I really like that the alchemyui tools can be called on "as
needed", so I'll probably be trying to use alchemyui for that sync'ing when
possible, and taking over manually when necessary. Fabio, I'll report back
on how things progress.

Thanks again,
Rob

On Fri, Jul 8, 2011 at 5:44 AM, Fabio Pliger <[hidden email]> wrote:

>  On Thu, 7 Jul 2011 11:39:14, Robert Kern <[hidden email]> wrote:
>> On Thu, Jul 7, 2011 at 11:28 AM, Rob Chambers <[hidden email]>
>> wrote:
>> > Hi all,
>> >
>> > I'm coming up to speed on Traits and TraitsUI, and I'm really grateful
>> to
>> > the devs for putting out such a fantastic piece of software. It's really
>> > been a joy learn.
>> >
>> > I was wondering, though, if you all have a strategy for integrating a
>> > traits-based application with a conventional database. I've been very
>> happy
>> > with SQLAlchemy, and it seems to be a great match with Traits. There
>> seems
>> > to have been some real development, recorded in the two mailing list
>> threads
>> > and small projects linked below, but it seems that they haven't been
>> updated
>> > to work with SQLAlchemy 7, and I see no indication that they worked
>> > reliably, anyways.
>> They did work reasonably well (for the functionality that they
>> implement) with older versions of SQLAlchemy. Unfortunately, it
>> appears that some of the SQLAlchemy APIs have changed out from
>> underneath us.
>
>
> I've had the same issues some years ago with some packages that used
> SQLAlchemy and Traits.. Back then we developed a package to decouple both
> module and use them without mixing their *black* magic ( metaclasses and
> related stuff ). The main idea is that you use your ORM classes as you like
> and "guify" them only you when you want to edit and/or validate them using
> traits powerful features. It also has support to create simple grid
> applications to display ORM instances and ad functionality buttons to
> manipulate data as you wish.  I've started refactoring that package to
> publish it as an open source project. It's in an early stage because of the
> tons of personal issues and events I've had lately. If you have some time
> and want to play around it you can clone it from my bitbucket repo (
> https://bitbucket.org/fpliger/alchemyui ). Right now it is an "as is"
> package. I was working on test and documentation but had to drop everything
> some weeks ago. Still you can take a look at the tutorial wich uses the
> SQLAlchemy standard tutorial to auto generate forms and a list of the ORM
> instances application. It's not ready for production yet but still you can
> do nice things with it ( at least I hope to :) ).
>
> If you try it please give me a feed back and I'll be happy to check if I
> can improve it.
>
> Fabio
>
> --
> Fabio Pliger
> *linkedin*  http://it.linkedin.com/in/fabiopliger
> *twitter*  http://twitter.com/b_smoke
>
>


--
Rob Chambers
http://www.rdchambers.net
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev