is there a way to install a lightweight database (eg. sqlite3) on ctrlX CORE to store configuration data of a snap.
I know that the ctrlX solutions snap is provided to save configurations to have backup data. But I want to access data in a more efficiently way and update snap data very often.
Thank you : )
Solved! Go to Solution.
The easiest way would be to use our data broker the ctrlX Data Layer for creating accessible data. See the SDK provider examples.
DataLayer broker might be easy to access, but I want to store persistent data (configuration data).
What would you suggest? Do you have experience with lightweight databases on ctrlX CORE?
On the ctrlX Data Layer it is also possible to create persistent variables. The storage type would be sharedretain. You can simply adapt the realtime example of our SDK.
See also the documentation of the Data Layer:
I have written something here based on the work here. I have introduced some bug in the latest version that I have not had time to fix. However, a version that works (at least for my testing) is available on snapcraft. You can download for the core using "UBUNTU_STORE_ARCH=arm64 snap download sqlite-ctrlx"
The read me should give you a good explanation.
Thanks for your help! I´ll try your app. : )
How did you install your sqlite db? I downloaded sqlite3 as a snap file, but couldn´t install it successfully.
On an Ubuntu machine you need to run "UBUNTU_STORE_ARCH=arm64 snap download sqlite-ctrlx" from the terminal. This will download the file for the hardware and "UBUNTU_STORE_ARCH=amd64 snap download sqlite-ctrlx" for the virutal core. Install them in the normal way after the download. You can ignore the assertion file that is downloaded. Make sure you have the option to run developer apps set on your core.
Just a comment on the snap that aFouraker references here: In this use case it is not required to install SQLite separately. The associated snap runs as a standalone, referencing SQLite internally.
When creating an app like this the only requirement is to import the sqlite3 module in your Python code.