Beispiel #1
0
 def forma(cls, key, params, fmt):
     params['dataset'] = 'forma'
     params['fmt'] = fmt
     filename = '{dataset}_{begin}_{end}_{iso}.{fmt}' \
         .format(**params)
     gcs_path = gcs.exists(filename)
     if gcs_path:
         blobstore_filename = '/gs%s' % gcs_path
         blob_key = blobstore.create_gs_key(blobstore_filename)
         entry = DownloadEntry(id=key, blob_key=blob_key)
         entry.put()
         return entry
Beispiel #2
0
 def forma(cls, key, params):
     params['dataset'] = 'forma'
     filename = '{dataset}_{begin}_{end}_{iso}.json' \
         .format(**params)
     gcs_path = gcs.exists(filename)
     if gcs_path:
         blobstore_filename = '/gs%s' % gcs_path
         blob_key = blobstore.create_gs_key(blobstore_filename)
         blob_reader = blobstore.BlobReader(blob_key)
         value = blob_reader.read()
         entry = AnalysisEntry(id=blob_key, value=value)
         entry.put()
         return entry
Beispiel #3
0
 def forma(cls, key, params):
     params['dataset'] = 'forma'
     filename = '{dataset}_{begin}_{end}_{iso}.json' \
         .format(**params)
     gcs_path = gcs.exists(filename)
     if gcs_path:
         blobstore_filename = '/gs%s' % gcs_path
         blob_key = blobstore.create_gs_key(blobstore_filename)
         blob_reader = blobstore.BlobReader(blob_key)
         value = blob_reader.read()
         entry = AnalysisEntry(id=blob_key, value=value)
         entry.put()
         return entry