Do you guys know what would give me column definition of table?

I have a table that I autoload and I would like to get this:

address_table = sqlalchemy.Table('address', metadata,
    sqlalchemy.Column('Address_Sid', sqlalchemy.Integer, primary_key=True),
    sqlalchemy.Column('FirstName', sqlalchemy.Unicode(40),nullable=False),
    sqlalchemy.Column('LastName', sqlalchemy.Unicode(40),nullable=False),
    sqlalchemy.Column('MaidenLastName', sqlalchemy.Unicode(40)),
    sqlalchemy.Column('Email', sqlalchemy.Unicode(80),nullable=False),


So:
I can get a list of tables:
for i in metadata.tables:
...     print i

list of columns:
 for i in metadata.tables['WMI'].original_columns:
...     print i

How do I get column type, indexes and primary keys?

Lucas





On Tue, Apr 15, 2008 at 7:44 PM, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> Hello,
> Is there maybe a feature in sqlalchemy that would allow me to autoload
> table from one database, and move it over to another database?
>
> 1. I would like to print data structure from autoload table. (then
> copy and paste it into new file  and use it to create new
> table)(without typing every data structure)
> 2. And/or autoload via one engine and autoupload via different engine
> and create_all()
> 3. Analyze csv files and create sqlalchemy definition like structure.
>
> Ideas?
>
> Lucas
>



-- 
Automotive Recall Database. Cars, Trucks, etc.
http://www.lucasmanual.com/recall/
TurboGears Manual-Howto
http://lucasmanual.com/pdf/TurboGears-Manual-Howto.pdf

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to