Python snap that uses ufw?

Hello,
I have python app that calls ufw commands to set up a firewall. I have connected the snap to the firewall-control plug. But still the python app cannot see ufw? Is this possible and if so, how?

I should mention I am installing on raspbian and I have confirmed ufw is installed.

Thanks for help…

ufw on your raspbian system would not be available in your snap’s runtime environment so your snap needs to ship ufw itself. You could use stage-packages, but I would instead suggest looking at upstream ufw’s snap packaging for inspiration (or perhaps using stage-snaps with ufw, but I’ve not done that).

Thanks for your help.

I did try to “stage-packages” with ufw but that did not work. I will try to stage-snap…