• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python serialization.ds_long函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: _deserialize_message_embedded_app

def _deserialize_message_embedded_app(stream):
    # type: (StringIO.StringIO) -> MessageEmbeddedApp
    ds_long(stream)  # version
    obj = MessageEmbeddedApp()
    obj.context = ds_unicode(stream)
    obj.description = ds_unicode(stream)
    obj.id = ds_unicode(stream)
    obj.image_url = ds_unicode(stream)
    obj.result = ds_unicode(stream)
    obj.title = ds_unicode(stream)
    return obj
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:11,代码来源:messaging.py


示例17: _deserialize_news_target_audience

def _deserialize_news_target_audience(stream, version):
    target_audience = None

    if ds_bool(stream):  # target audience enabled
        target_audience = NewsTargetAudienceTO()
        target_audience.min_age = ds_long(stream)
        target_audience.max_age = ds_long(stream)
        target_audience.gender = ds_long(stream)
        if version >= 6:
            target_audience.connected_users_only = ds_bool(stream)
    return target_audience
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:11,代码来源:news.py


示例18: _deserialize_member_status

def _deserialize_member_status(stream, version):
    r = MemberStatus()
    r.status = ds_long(stream)
    r.received_timestamp = ds_long(stream)
    r.acked_timestamp = ds_long(stream)
    r.index = ds_long(stream)
    r.dismissed = ds_bool(stream)
    r.button_index = ds_long(stream)
    r.custom_reply = ds_unicode(stream)
    r.form_result = deserialize_form_result(stream) if version >= 2 else None
    r.ack_device = ds_unicode(stream) if version >= 3 else None
    return r
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:12,代码来源:messaging.py


示例19: _setup

    def _setup(self):
        if self._initialized:
            return

        if not self._stream:
            raise Exception("NewsStatisticPerApp not ready, but setup was called.")

        self._data = defaultdict(NewsItemStatistics)
        ds_long(self._stream)  # version
        for _ in xrange(ds_long(self._stream)):
            app_id = ds_unicode(self._stream)
            self._data[app_id] = _deserialize_news_item_statistics(self._stream)

        self._initialized = True
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:14,代码来源:news.py


示例20: _deserialize_advanced_order_item

def _deserialize_advanced_order_item(stream):
    version = ds_long(stream)
    i = AdvancedOrderItem()
    i.id = ds_unicode(stream)
    i.name = ds_unicode(stream)
    i.description = ds_unicode(stream)
    i.value = ds_long(stream)
    i.unit = ds_unicode(stream)
    i.unit_price = ds_long(stream)
    i.step = ds_long(stream)
    i.step_unit = ds_unicode(stream)
    i.step_unit_conversion = ds_long(stream)
    i.image_url = ds_unicode(stream) if version >= 2 else None
    i.has_price = ds_bool(stream) if version >= 3 else True
    return i
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:15,代码来源:forms.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python serialization.ds_unicode函数代码示例发布时间:2022-05-27
下一篇:
Python properties.azzert函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap