Reputation: 10623
I'm creating an application using python and sqllite3. Are the users required to install sqllite manually?
How do I create the tables and do initialization while installing?
Upvotes: 1
Views: 673
Reputation: 1681
The sqlite3 module is part of the python standard library and shipped with python itself. Having sqlite installed is a requirement, but (at least on linux) package managers take care of installing sqlite (I can't say anything about windows here).
You can create your tables on the first run of your application. To make sure you're not trying to create them twice, use CREATE TABLE IF NOT EXISTS ...
(cf. the docs) which will only create the table if it doesn't already exist.
Upvotes: 2