def CreateUploadSession(creation, success_path, user, max_bytes_per_blob, max_bytes_total, bucket_name=None):
 entity = datastore.Entity(_UPLOAD_SESSION_KIND, namespace='')
 entity_dict = {'creation': creation, 'success_path': success_path, 'user': user, 'state': 'init', 'max_bytes_per_blob': max_bytes_per_blob, 'max_bytes_total': max_bytes_total}
 if bucket_name:
  entity_dict['gs_bucket_name'] = bucket_name
 entity.update(entity_dict)
 datastore.Put(entity)
 return str(entity.key())

def CreateUploadSession ( creation , success_path , user , max_bytes_per_blob , max_bytes_total , bucket_name = None ) : entity = datastore . Entity ( _UPLOAD_SESSION_KIND , namespace = '' ) entity_dict = { 'creation' : creation , 'success_path' : success_path , 'user' : user , 'state' : 'init' , 'max_bytes_per_blob' : max_bytes_per_blob , 'max_bytes_total' : max_bytes_total } if bucket_name : entity_dict [ 'gs_bucket_name' ] = bucket_name entity . update ( entity_dict ) datastore . Put ( entity ) return str ( entity . key ( ) )
create upload session in datastore .