{"repo":"victorqribeiro/rpiapi","free":true,"listed":false,"github":"https://github.com/victorqribeiro/rpiapi","clone":"git clone https://github.com/victorqribeiro/rpiapi.git","description":"An API for your Raspberry Pi","language":"Python","stars":87,"topics":["raspberry-pi","rpi-gpio","api","wsgi","python","apache2","libapache2-mod-wsgi"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"RPi API An API for your Raspberry Pi. About RPiAPI is a lightweight WSGI API built on top of the RPi GPIO library. It provides endpoints so you can interact with your Raspberry PI over the internet. With an API you can design your very own apps without having to worrying too much about the backend. Installing To install the RPiAPI you will need to clone it from GitHub, move the rpiapi folder to a place where Apache can access, enable mod-wsgi, create a wsgi configuration file for the RPiAPI , add the www-data user to the gpio group (so the Apache can control the pins on the raspberry pi) and set up a password on the rpiapi folder so only authorized people could access it. Or, you can just call and let the script do all that for you. Note that I ALWAYS recommend reading the code of a script before running it as a root user. Endpoints [GET] - rpiapi/ The root end point of the API will return a dictionary with the values for the GPIO.RPI INFO, GPIO.VERSION and MODE ( GPIO.setmode() ). By Default the RPiAPI is set as BOARD. [GET] - rpiapi/activate/{pin number} The activate endpoint will output a - HIGH 1 True - value on the pin and return a 1 if ok or a error message. [GET] - rpiapi/deactivate/{pin number} The deactivate endpoint will output a - LOW 0 False - value on the pin and return a 0 if ok or a error message. [GET] - rpiapi/mode/{pin number} The mode endpoint will return the current mode of the pin or an error message. The values might be: - GPIO.IN - GPIO.OUT - GPIO.SPI -","default_branch":null,"files":null,"tree":[],"storefront":"/r/victorqribeiro","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/victorqribeiro/rpiapi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}