gs-proxy
gs-proxy copied to clipboard
A simple cache proxy for Google spreadsheets.
GS Proxy
A dead simple, caching proxy for Google spreadsheets. Uses Flask and meant to be deployed on Heroku.
Install and run locally
- Create a virtualenv
pip install -r requirements.txt- Set spreadsheet keys that are acceptable:
export GS_PROXY_KEYS=<KEY1>,<KEY2>,<KEY3> - Set how many minutes to keep cached values (default is 5):
export GS_PROXY_CACHE=<MINUTES> - Run locally:
python app.py - Go to http://localhost:5000
Deploy on Heroku
For Heroku.
- Setup and install Heroku command line tools
- Create Heroku app with whatever name you want:
heroku apps:create <APP_NAME> - Add spreadsheet keys:
heroku config:set GS_PROXY_KEYS=<KEY1>,<KEY2>,<KEY3> - (optional) Set cache time limit:
heroku config:set GS_PROXY_CACHE=<MINUTES> - Push up code:
git push heroku master - You can open the app with
heroku open - Use in your application by making a request like the following. Make sure to encode the proxy url parameter.
http://<APP_NAME>.herokuapp.com/proxy?url=https%3A//spreadsheets.google.com/feeds/worksheets/<KEY1>/public/basic%3Falt%3Djson-in-script