Set up an API for Raspberry Pi, based on a simple .INI config file
-
SilverSpoon.py - the program
-
config/services.ini - the config file
-
install flask:
sudo apt-get install python-pip sudo pip install flask sudo pip install requests
- python SilverSpoon.py
;; will be available as /dothis?file=example.mp4
[dothis]
;; start command in this folder
folder=/var/video
;; define default value for variables
file=test.mp4
;; command to execute in shell
command="omxplayer {file}"