Python google.appengine.ext.db.Blob() Examples

The following are 30 code examples of google.appengine.ext.db.Blob(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module google.appengine.ext.db , or try the search function .
Example #1
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore. 
Example #2
Source File: appengine.py    From luci-py with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore. 
Example #3
Source File: appengine.py    From luci-py with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore. 
Example #4
Source File: appengine.py    From luci-py with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore. 
Example #5
Source File: appengine.py    From luci-py with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore. 
Example #6
Source File: appengine.py    From twitter-for-bigquery with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #7
Source File: appengine.py    From twitter-for-bigquery with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #8
Source File: djangoforms.py    From python-compat-runtime with Apache License 2.0 5 votes vote down vote up
def get_value_for_form(self, instance):
    """Extract the property value from the instance for use in a form.

    There is no way to convert a Blob into an initial value for a file
    upload, so we always return None.
    """
    return None 
Example #9
Source File: djangoforms.py    From python-compat-runtime with Apache License 2.0 5 votes vote down vote up
def make_value_from_form(self, value):
    """Convert a form value to a property value.

    This extracts the content from the UploadedFile instance returned
    by the FileField instance.
    """
    if have_uploadedfile and isinstance(value, uploadedfile.UploadedFile):
      if not self.form_value:
        self.form_value = value.read()
      b = db.Blob(self.form_value)
      return b
    return super(BlobProperty, self).make_value_from_form(value) 
Example #10
Source File: appengine.py    From jarvis with GNU General Public License v2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore. 
Example #11
Source File: appengine.py    From jarvis with GNU General Public License v2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore. 
Example #12
Source File: appengine.py    From luci-py with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore. 
Example #13
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore. 
Example #14
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #15
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #16
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #17
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #18
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #19
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore. 
Example #20
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        logger.info("get: Got type " + str(type(model_instance)))
        cred = super(CredentialsProperty, self).get_value_for_datastore(
            model_instance)
        if cred is None:
            cred = ''
        else:
            cred = cred.to_json()
        return db.Blob(cred)

    # For reading from datastore. 
Example #21
Source File: appengine.py    From data with GNU General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #22
Source File: appengine.py    From googleapps-message-recall with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #23
Source File: appengine.py    From earthengine with MIT License 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #24
Source File: appengine.py    From splunk-ref-pas-code with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #25
Source File: appengine.py    From splunk-ref-pas-code with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #26
Source File: appengine.py    From sndlatr with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #27
Source File: appengine.py    From sndlatr with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #28
Source File: appengine.py    From billing-export-python with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    flow = super(FlowProperty,
                 self).get_value_for_datastore(model_instance)
    return db.Blob(pickle.dumps(flow))

  # For reading from datastore. 
Example #29
Source File: appengine.py    From billing-export-python with Apache License 2.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
    logger.info("get: Got type " + str(type(model_instance)))
    cred = super(CredentialsProperty,
                 self).get_value_for_datastore(model_instance)
    if cred is None:
      cred = ''
    else:
      cred = cred.to_json()
    return db.Blob(cred)

  # For reading from datastore. 
Example #30
Source File: appengine.py    From aqua-monitor with GNU Lesser General Public License v3.0 5 votes vote down vote up
def get_value_for_datastore(self, model_instance):
        flow = super(FlowProperty, self).get_value_for_datastore(
            model_instance)
        return db.Blob(pickle.dumps(flow))

    # For reading from datastore.