当前位置: 首页>>代码示例>>Python>>正文


Python serialization.ds_long函数代码示例

本文整理汇总了Python中mcfw.serialization.ds_long函数的典型用法代码示例。如果您正苦于以下问题:Python ds_long函数的具体用法?Python ds_long怎么用?Python ds_long使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ds_long函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _deserialize_advanced_order_category

def _deserialize_advanced_order_category(stream):
    c = AdvancedOrderCategory()
    ds_long(stream)  # version
    c.id = ds_unicode(stream)
    c.name = ds_unicode(stream)
    c.items = _deserialize_advanced_order_item_list(stream)
    return c
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例2: _deserialize_text_widget

def _deserialize_text_widget(stream, w):
    version = ds_long(stream)
    w.value = ds_unicode(stream)
    w.place_holder = ds_unicode(stream)
    w.max_chars = ds_long(stream)
    w.keyboard_type = ds_unicode(stream) if version >= 2 else TextWidget.keyboard_type.default
    return w
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例3: deserialize_advanced_order

def deserialize_advanced_order(stream):
    ds_long(stream)
    w = AdvancedOrder()
    w.currency = ds_unicode(stream)
    w.leap_time = ds_long(stream)
    w.categories = _deserialize_advanced_order_category_list(stream)
    return w
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例4: _deserialize_news_sender

def _deserialize_news_sender(stream):
    _ = ds_long(stream)  # version
    sender = NewsSenderTO()
    sender.email = ds_unicode(stream)
    sender.name = ds_unicode(stream)
    sender.avatar_id = ds_long(stream)
    return sender
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:7,代码来源:news.py

示例5: deserialize_pay_widget_result

def deserialize_pay_widget_result(stream):
    ds_long(stream)  # version
    result = PayWidgetResult()
    result.transaction_id = ds_unicode(stream)
    result.provider_id = ds_unicode(stream)
    result.status = ds_unicode(stream)
    return result
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例6: deserialize_oauth

def deserialize_oauth(stream):
    ds_long(stream)  # version
    w = Oauth()
    w.url = ds_unicode(stream)
    w.success_message = ds_unicode(stream)
    w.caption = ds_unicode(stream)
    return w
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例7: _deserialize_base_payment_method

def _deserialize_base_payment_method(stream):
    version = ds_long(stream)  # version
    if version > 1:
        if not ds_bool(stream):
            return None
    return BasePaymentMethod(currency=ds_unicode(stream),
                             amount=ds_long(stream),
                             precision=ds_long(stream))
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:8,代码来源:forms.py

示例8: _deserialize_attachment

def _deserialize_attachment(stream, version):
    a = Attachment()
    a.index = ds_long(stream)
    a.content_type = ds_unicode(stream)
    a.download_url = ds_unicode(stream)
    a.size = ds_long(stream)
    a.name = None if version < 2 else ds_unicode(stream)
    return a
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:messaging.py

示例9: _deserialize_payment_method

def _deserialize_payment_method(stream):
    c = PaymentMethod()
    ds_long(stream)  # version
    c.provider_id = ds_unicode(stream)
    c.currency = ds_unicode(stream)
    c.amount = ds_long(stream)
    c.precision = ds_long(stream)
    return c
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:forms.py

示例10: _deserialize_button

def _deserialize_button(stream, version):
    b = Button()
    b.id = ds_unicode(stream)
    b.index = ds_long(stream)
    b.caption = ds_unicode(stream)
    b.action = ds_unicode(stream)
    b.ui_flags = ds_long(stream) if version >= 2 else 0
    return b
开发者ID:gitter-badger,项目名称:rogerthat-backend,代码行数:8,代码来源:messaging.py

示例11: _ds_thumbnail

def _ds_thumbnail(stream):
    has_thumbnail = ds_bool(stream)
    if has_thumbnail:
        return Thumbnail(
            url=ds_unicode(stream),
            height=ds_long(stream),
            width=ds_long(stream),
        )
    return None
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:9,代码来源:messaging.py

示例12: deserialize_form_result

def deserialize_form_result(stream):
    ds_long(stream)  # version
    type = ds_unicode(stream)  # @ReservedAssignment
    if not type:
        return None
    fr = FormResult()
    fr.type = type
    fr.result = WIDGET_RESULT_MAPPING[fr.type].model_deserialize(stream)
    return fr
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:9,代码来源:forms.py

示例13: _deserialize_payment_method

def _deserialize_payment_method(stream):
    c = PaymentMethod()
    version = ds_long(stream)  # version
    c.provider_id = ds_unicode(stream)
    c.currency = ds_unicode(stream)
    c.amount = ds_long(stream)
    c.precision = ds_long(stream)
    c.calculate_amount = ds_bool(stream) if version > 1 else False
    c.target = ds_unicode(stream) if version > 1 else None
    return c
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:forms.py

示例14: deserialize_location_widget_result

def deserialize_location_widget_result(stream):
    version = ds_long(stream)
    result = LocationWidgetResult()
    result.horizontal_accuracy = ds_float(stream)
    result.latitude = ds_float(stream)
    result.longitude = ds_float(stream)
    result.altitude = ds_float(stream)
    result.timestamp = 0 if version < 2 else ds_long(stream)
    result.vertical_accuracy = -1 if version < 2 else ds_float(stream)
    return result
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:10,代码来源:forms.py

示例15: _deserialize_kv_store

def _deserialize_kv_store(stream):
    ds_long(stream)  # version
    ancestor_key = ds_str(stream)
    if ancestor_key is None:
        return None
    kv_store = KVStore(db.Key(ancestor_key))
    kv_store._bucket_sizes = _deserialize_dict(stream, ds_long, ds_long)
    kv_store._keys = _deserialize_dict(stream, ds_unicode, ds_long)
    kv_store._blob_keys = _deserialize_dict(stream, ds_unicode, ds_long_list)
    return kv_store
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:keyvalue.py


注:本文中的mcfw.serialization.ds_long函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。