I’m surprised that I cannot find a SQLite snap from the store. I noticed from a ‘sqlite’ search in the forum that there are discussions about snaps which include SQLite - so I’m assuming that SQLite is somewhere to be found as a snap. Any suggestions on how to install SQLite on Ubuntu Core?
Those snaps which include sqlite most likely include it as part of their stage-packages; there’s no need to have a standalone sqlite snap in order to include it as part of other snaps.
I can imagine that sqlite is mostly used for specific software to manage their own internal database; its local nature means one is less likely to need a client, like one would need a, say, postgresql client to interact with an external postgresql database server.
The snap I would like to create, is one which reads data from a serial port, using python(3), to populate a local SQLite database. I know that python is already installed on Ubuntu Core. So, would I need to build the snap as a python app which has SQLite as a stage-package?
If so, would snapcraft build SQLite from source code (220k lines)?
I believe there should be a python binding of the sqlite database library to add in the stage-packages. Build from source is not needed if the one provided by ubuntu packages will work.
I’m very happy to report that the sqlite3 module is already pre-installed with python3 on Ubuntu Core 16 (I’m guessing this may already be well-known by many)
Does this still mean that sqlite3 should be listed as a stage-package? As well as any other module import within the python script?
First and foremost, if it’s in a stable core (core and core18) and you can use it from a strict snap, it’ll continue being there. We might add things, but we’ve promised not to remove things.
Second, both core and core18's python3 installation has sqlite3 support.