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

[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 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=

[sqlalchemy] SQL insert error

2013-04-17 Thread Philipp Kraus
Hello, I have try to insert some data from a dict into my table and I have used the description on http://docs.sqlalchemy.org/en/rel_0_8/core/tutorial.html#insert-expressions I run this command: connect.execute( sqlalchemy.Table( tablename, metadata ).insert().values( i.keys() ).compile(),