0

Is there a way where I can use an existing table in my sql server with SQLAlchemy? I want to insert data and I want to use an existing table, a table I didn't define using classes.

I am using Python 2.7 and SQLAlchemy 0.8

1 Answer 1

0

It is possible in 0.8 by defining a autoload-ed table:

foo = Table('foo', meta, autoload=True, autoload_with=engine)

Table columns can be accessed via foo.c:

print list(foo.c)

Starting from 0.9.1, SQLAlchemy has experimental extension called automap.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.