Torizon Python3 and Gpio

How can I control General Purpose Input/Output (Gpio) using a debian docker in torizon by developing my application with Python3 on an ’ Colibri iMX7 ’ module?
Thank you in advance to those who will kindly answer me.

I’m not exactly sure, but this might work?

Dear @Rem0068,

There are a multitude of ways to manipulate GPIOs especially when you factor in a Debian container that can pull in additional packages. The sysfs approach that kswain mentioned is certainly one option, and is the traditional method that has been used in our non-Torizon BSP.

Another option would be the libpiod interface: libgpiod/bindings/python at master · brgl/libgpiod · GitHub
For which there is also a python-libgpiod package in Debian.

Also for reference we also have a page on developing Python with Visual Studio Code and Torizon here: Python Development and Debugging on TorizonCore Using Visual Studio Code | Toradex Developer Center

Best Regards,
Jeremias