Jump to content

Help convert simple bash library to python class

Recommended Posts

We're using this library as the base to automating testing via power control in some of our SBC test farms.




It would be great to convert this in to a simple python3 class.    Given we use this with various SBCs, I would recommend using https://docs.python.org/3/library/subprocess.html#module-subprocess to continue to exec via the gpio shell command other than a native python gpio library.


extra credit: create a REST API via flask

extra extra credit: Add Swagger interface to REST API

extra extra extra credit: react interface to REST API :P 

Link to comment
Share on other sites

Was trying to keep things simple and quick when asking for help.  I figured the underlying components in the class cloud be retrofitted to a better gpio solution in the future.


Totally up for libgpiod seems like its come along quite a bit since I last used it. (No pullup or pulldown suppoty at the time.)  Would it play nice with my i2c expander?


10 hours ago, tparys said:

Is there need to reinvent the wheel here?


Whatever can be delivered fastest that is reliable.  If using the sysfs gpio commands from my script minimal gpio knowledge is really need by the developer.

Link to comment
Share on other sites

  • Igor locked this topic
This topic is now closed to further replies.
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines