climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1563544 - /incubator/climate/trunk/ocw-ui/backend/dataset_helpers.py
Date Sun, 02 Feb 2014 02:31:58 GMT
Author: joyce
Date: Sun Feb  2 02:31:57 2014
New Revision: 1563544

URL: http://svn.apache.org/r1563544
Log:
Initial dataset_helpers cleanup

Modified:
    incubator/climate/trunk/ocw-ui/backend/dataset_helpers.py

Modified: incubator/climate/trunk/ocw-ui/backend/dataset_helpers.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/dataset_helpers.py?rev=1563544&r1=1563543&r2=1563544&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/dataset_helpers.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/dataset_helpers.py Sun Feb  2 02:31:57 2014
@@ -14,16 +14,16 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
-#!/usr/bin/env python
-"""
-    Provides Bottle services for interacting with RCMED
-"""
 
-from bottle import request, route
+''' Services for interacting with NASA JPL's Regional Climate Model Evaluation Database.
'''
+
+from bottle import Bottle, request
 
 import requests
 
-@route('/getObsDatasets')
+dataset_app = Bottle()
+
+@dataset_app.route('/getObsDatasets')
 def getObservationDatasetData():
     r = requests.get('http://rcmes.jpl.nasa.gov/query-api/datasets.php')
 
@@ -34,7 +34,7 @@ def getObservationDatasetData():
     else:
         return r.text
 
-@route('/getDatasetParam')
+@dataset_app.route('/getDatasetParam')
 def getDatasetParameters():
     url = 'http://rcmes.jpl.nasa.gov/query-api/parameters.php?dataset=' + request.query.dataset
     r = requests.get(url)



Mime
View raw message