Raspberry PI Controllable API. (Graduation Project)
- Endpoints (swagger)
- Installation (wiki)
- Security Issues (wiki)
- Authorization (wiki)
- Error Responses (wiki)
- GPIO Limitations (wiki)
- SPA Client (webpi-app)
- File Management
- file(s) information on directory (like
ls -al
) - download and upload file
- create directory
- delete file or directory
- file(s) information on directory (like
- GPIO Management
- gpio pin(s) status (only general + hw_pwm pins)
- set mode of pin
- set output value of pin
- set pwm dutycycle and frequency of pin
- PI Infomation
- PI spec
- PI status (i.e. time, memory used, # of procs)
- process information (Top 10 CPU/MEM using processes)
- Simple Terminal
- create subprocess (
bash
) - make input to subprocess
- get output from subprocess
- kill subprocess
- create subprocess (
- Raspberry PI 2
- Raspbian Buster (2019-06)
- SDCard >= 32GB
django
anddrf
for API serverpigpio
for controlling gpiopsutil
for retrieving process information
# setup
virtualenv venv -p python3
source venv/bin/activate
pip install -r requirements.txt
# run
export PIGPIO_ADDR={YOUR_PI_ADDR}
python manage.py runserver
- uses django.test(
unittest
)
$ export PIGPIO_ADDR={YOUR_PI_ADDR}
$ coverage run manage.py test