def get(self):
    if not handlers.IsHttps(self):
      # TODO(user): Does blobstore support https yet? If so, we can
      # enforce security in app.yaml and not do this check here.
      return

    if not auth.HasPermission(auth.UPLOAD):
      self.error(403)
      return

    mode = self.request.get('mode')
    msg = self.request.get('msg', None)
    if mode == 'success':
      filename = self.request.get('filename')
      msg = '%s successfully uploaded and is ready for deployment.' % filename
      self.redirect('/admin/package/%s?msg=%s' % (filename, msg))
    elif mode == 'error':
      self.response.set_status(400)
      self.response.out.write(msg)
    else:
      filename = self.request.get('filename')
      if not filename:
        self.response.set_status(404)
        self.response.out.write('Filename required')
        return

      p = models.PackageInfo.get_by_key_name(filename)
      if not p:
        self.response.set_status(400)
        self.response.out.write(
            'You must first upload a pkginfo for %s' % filename)
        return
      elif p.blob_info:
        self.response.set_status(400)
        self.response.out.write('This file already exists.')
        return

      values = {
          'upload_url': blobstore.create_upload_url(
              '/admin/uploadpkg', gs_bucket_name=util.GetBlobstoreGSBucket()),
          'filename': filename,
          'file_size_kbytes': p.plist['installer_item_size'],
      }
      self.Render('upload_pkg_form.html', values)
Decoder for deserializing numpy data types.
dataset/ETHPy150Open google/simian/src/simian/mac/admin/uploadpkg.py/UploadPackage.get--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/io/packers.py/decode