[sqlalchemy] Re: SQLalchemy coding style

2007-10-30 Thread Rick Morrison
If you don't want to pollute the current namespace, then make an indirect reference. 1) Make a module of your own, say db.py 2) In db.py: ... from sqlalchemy import * from sqlalchemy.orm import * ... table1 = Table('footable', ...) ... # other ta

[sqlalchemy] Re: SQLalchemy coding style

2007-10-30 Thread Lukasz Szybalski
On 10/30/07, McA <[EMAIL PROTECTED]> wrote: > > Hi all, > > thank you for your comments. > I really expected to get comments from more people. > But probably I'm concerned about something you don't have to. ;-) > > So, I'll wait. > it seems better to use: import sqlalchemy and in code do: sqlalch

[sqlalchemy] Re: SQLalchemy coding style

2007-10-30 Thread McA
Hi all, thank you for your comments. I really expected to get comments from more people. But probably I'm concerned about something you don't have to. ;-) So, I'll wait. Best regards Andreas --~--~-~--~~~---~--~~ You received this message because you are subscr

[sqlalchemy] Re: SQLalchemy coding style

2007-10-29 Thread Huy Do
McA wrote: > Hi all, > > I'm intersted in using sqlalchemy and started to read the manuals. > I didn't find a hint for my question, so I'm asking here. I hope it's > not too annoying. > > Most code examples in the documentation use something like this > >>> >from sqlalchemy. import >>>

[sqlalchemy] Re: SQLalchemy coding style

2007-10-29 Thread Werner F. Bruhin
McA wrote: > Hi all, > > I'm intersted in using sqlalchemy and started to read the manuals. > I didn't find a hint for my question, so I'm asking here. I hope it's > not too annoying. > > Most code examples in the documentation use something like this > >>> >from sqlalchemy. import >>>

[sqlalchemy] Re: SQLalchemy coding style

2007-10-29 Thread Nebur
> What would you recommend? How are the gurus out there using > sqlalchemy? I don't know what the gurus are doing. I'll answer as long as none of them does :-) It's probably what you're assuming already: Mapped classes can be treated as "Active Records". Usually, I'm encapsulating these active r

[sqlalchemy] Re: SQLalchemy coding style

2007-10-29 Thread Paul Johnston
Hi, I have a python file for all the table and class definitions (model.py). In that I do from sqlalchemy import *, and that's ok as in that one file I know not to use names like Table. In my other python files I just import classes from model.py, and specific bits of sqlalchemy. Ok, occasionally