dump csv from sqlalchemy
        Posted  
        
            by afilatun
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by afilatun
        
        
        
        Published on 2010-06-01T18:44:12Z
        Indexed on 
            2010/06/01
            19:53 UTC
        
        
        Read the original article
        Hit count: 394
        
For some reason, I want to dump a table from a database (sqlite3) in the form of a csv file. I'm using a python script with elixir (based on sqlalchemy) to modify the database. I was wondering if there is any way to dump the table I use to csv.
I've seen sqlalchemy serializer but it doesn't seem to be what I want. Am I doing it wrong? Should I call the sqlite3 python module after closing my sqlalchemy session to dump to a file instead? Or should I use something homemade?
© Stack Overflow or respective owner