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


Python Element.is_internal方法代码示例

本文整理汇总了Python中lxml.objectify.Element.is_internal方法的典型用法代码示例。如果您正苦于以下问题:Python Element.is_internal方法的具体用法?Python Element.is_internal怎么用?Python Element.is_internal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lxml.objectify.Element的用法示例。


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

示例1: handle

# 需要导入模块: from lxml.objectify import Element [as 别名]
# 或者: from lxml.objectify.Element import is_internal [as 别名]
    def handle(self, *args, **kwargs):

        params = _get_params(kwargs.get('payload'), ['cluster_id', 'connection', 'transport'], 'data.')

        with closing(self.server.odb.session()) as session:
            item_list = Element('item_list')
            db_items = http_soap_list(session, params['cluster_id'], params['connection'], params['transport'])
            
            for db_item in db_items:

                item = Element('item')
                item.id = db_item.id
                item.name = db_item.name
                item.is_active = db_item.is_active
                item.is_internal = db_item.is_internal
                item.url_path = db_item.url_path
                item.method = db_item.method
                item.soap_action = db_item.soap_action
                item.soap_version = db_item.soap_version
                item.service_id = db_item.service_id
                item.service_name = db_item.service_name
                item.security_id = db_item.security_id
                item.security_name = db_item.security_name
                item.security_def_type = db_item.security_def_type

                item_list.append(item)

            return ZATO_OK, etree.tostring(item_list)
开发者ID:brtsz,项目名称:zato,代码行数:30,代码来源:http_soap.py

示例2: handle

# 需要导入模块: from lxml.objectify import Element [as 别名]
# 或者: from lxml.objectify.Element import is_internal [as 别名]
    def handle(self, *args, **kwargs):
        
        params = _get_params(kwargs.get('payload'), ['id', 'cluster_id'], 'data.')
        
        with closing(self.server.odb.session()) as session:

            db_item = service(session, params['cluster_id'], params['id'])
            
            item = Element('item')
            item.id = db_item.id
            item.name = db_item.name
            item.is_active = db_item.is_active
            item.impl_name = db_item.impl_name
            item.is_internal = db_item.is_internal
            item.usage_count = 'TODO getbyid'
    
            return ZATO_OK, etree.tostring(item)
开发者ID:brtsz,项目名称:zato,代码行数:19,代码来源:service.py


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