Re: [sqlalchemy] creating transaction

2013-04-19 Thread Philipp Kraus
Thanks for your great explanation, I think I would help, but I must describe some additional information in my using: I try to create a proof-of-concept for a database builder eg http://www.liquibase.org/ I use for my project SCons ( http://www.scons.org ) like a build toolkit and would like to

Re: [sqlalchemy] creating transaction

2013-04-19 Thread Michael Bayer
On Apr 19, 2013, at 11:13 AM, Philipp Kraus philipp.kr...@flashpixx.de wrote: Thanks for your great explanation, I think I would help, but I must describe some additional information in my using: I try to create a proof-of-concept for a database builder eg http://www.liquibase.org/ I use

[sqlalchemy] creating transaction

2013-04-18 Thread Philipp Kraus
Hello, I try to use SQLAlchemy in buildscripts for SCons, so I run my SCons script and depend on the data all tables are created. I'm new with SQLAlchemy and Python database access, so can I create a transaction with SQLAlchemy for the create table statements and also the insert statements, so

Re: [sqlalchemy] creating transaction

2013-04-18 Thread Richard Gerd Kuesters
Hello Phillip :) IMHO, your best options are the SA examples (in the source code) folder and, for further abstractions, you could check SA test units :) Works great for me! Cheers, Richard. Em 2013-04-18 17:22, Philipp Kraus escreveu: Hello, I try to use SQLAlchemy in buildscripts

Re: [sqlalchemy] creating transaction

2013-04-18 Thread Philipp Kraus
Hi Gerd, I have taken a look to the examples, but I don't understand, in which way I can use the transaction with the create_all option. A short code excerpt: engine = sqlalchemy.create_engine(env[connection], echo = env.get(DATABASE_VERBOSE, False) ) metadata=

Re: [sqlalchemy] creating transaction

2013-04-18 Thread Richard Gerd Kuesters
Hey Phillip! First, you must understand a simple concept: when you declare a table in SA, either declarative or traditionally, you're already sayin' to the SA engine that there are tables. Then, you can create them (if they do not exist), populate them and drop'em. You can even specify your

Re: [sqlalchemy] creating transaction

2013-04-18 Thread Richard Gerd Kuesters
And ... Sorry for my bad english. Em 2013-04-18 20:23, Richard Gerd Kuesters escreveu: Hey Phillip! First, you must understand a simple concept: when you declare a table in SA, either declarative or traditionally, you're already sayin' to the SA engine that there are tables. Then, you

Re: [sqlalchemy] creating transaction

2013-04-18 Thread Michael Bayer
On Apr 18, 2013, at 4:22 PM, Philipp Kraus philipp.kr...@flashpixx.de wrote: Hello, I try to use SQLAlchemy in buildscripts for SCons, so I run my SCons script and depend on the data all tables are created. I'm new with SQLAlchemy and Python database access, so can I create a