I made a very simple (and convenient) snap manager here:
I want to make a snap from this Python 3 script: start a terminal and launch this script. For sure it should be easy. But for sure I fail until now.
What files content (setup.py, snapcraft.yaml) are needed here ?
IIRC, it is not possible to do snap operations in a snap without the
snapd-control interface or classic confinement.
The application name may also raises concerns regarding whether it is an official application in the snap ecosystem and may confuse its users in installing a possibly malicious program with a similar name with weaker confinement.
As @Lin-Buo-Ren points out, there is not a way to do this without using
snapd-control which is a privileged interface only afforded to applications published in brand stores.
Additionally, you should try to use the snapd REST API instead of calling the snap commands directly as the output may change, etc.
Well, I finally commit a GNOME extension to do this.
I’ll use snapd api when every other tasks I have to achieve will be completed.