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


Python Release.by_classifiers方法代码示例

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


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

示例1: test_by_classifiers

# 需要导入模块: from pyshop.models import Release [as 别名]
# 或者: from pyshop.models.Release import by_classifiers [as 别名]
 def test_by_classifiers(self):
     from pyshop.models import Release
     releases = Release.by_classifiers(self.session,
                                       [u'Intended Audience :: Developers'])
     self.assertIsInstance(releases, list)
     releases = [(r.package.name, r.version) for r in releases]
     self.assertEqual(releases, [(u'local_package1', u'0.1')])
开发者ID:DeaconDesperado,项目名称:pyshop,代码行数:9,代码来源:test_models.py

示例2: browse

# 需要导入模块: from pyshop.models import Release [as 别名]
# 或者: from pyshop.models.Release import by_classifiers [as 别名]
    def browse(self, classifiers):
        """
        Retrieve a list of (name, version) pairs of all releases classified
        with all of the given classifiers. 'classifiers' must be a list of
        Trove classifier strings. 

        changelog(since)
        Retrieve a list of four-tuples (name, version, timestamp, action)
        since the given timestamp. All timestamps are UTC values.
        The argument is a UTC integer seconds since the epoch. 
        """
        session = DBSession()
        release = Release.by_classifiers(session, classifiers)
        rv = [(r.package.name, r.version) for r in release]
        return rv
开发者ID:DeskGen,项目名称:pyshop,代码行数:17,代码来源:xmlrpc.py


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