| Project | Created | Updated | Version |
|---|---|---|---|
| Shiny RESTful | 14/1/2017 | 14/1/2017 | 0.1 |
Demonstration of using a R Shiny Dashboard calling a Python RESTful API.
This API was created using a simple to use package called hug. hug aims to make developing Python driven APIs as simple as possible, but no simpler. As a result, it drastically simplifies Python API development.
hug -f PythonRESTful/RESTful/SimpleAPI.pyThe API provide three endpoints:
- cars => http://localhost:8000/cars
- pressure => http://localhost:8000/pressure
- rock => http://localhost:8000/rock
See the README.md file in the Python RESTful folder
Three files are used to create the Dashboard:
- a script to define the user interface (ui.R)
- a script to set the server that responds to UI actions and displays the charts (server.R)
- a supporting file that creates variables and functions that are globally available to bother the server and UI scripts (global.R).
Features:
- GET requests
- Authentication (Basic)
- POST request
Simply open any of the file R files; server, ui or global. Once open you will see a "Run" icon in the upper right hand side of the script pane, click that option.
Adjacent to the "Run" icon is a dropdown, select "Run External" before running.
See the README.md file in the Python RESTful folder