Reputation: 305
I need to read data from MySQL, process it with python script and write the result into Sqlite.
Also, I need to convert MySql create definitions to Sqlite create definitions.
Are there any existing libraries for python to convert MySql data type (including set
, enum
, timestamp
, etc.) to Sqlite data type, or I should write it myself?
Upvotes: 1
Views: 109
Reputation: 5350
Depending on your use case, you could use an ORM library like peewee for abstracting away the MySQL and Sqlite databases.
One possible way of approaching your problem would be to use peewee's model generator for creating models for the MySQL database, which you can later reuse for the Sqlite one using this example as reference.
Upvotes: 1