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

Python utils.fetch_page函数代码示例

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

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



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

示例1: get

 def get(self, **kwargs):
     if kwargs.get('form_type') and 'RFAI' in kwargs.get('form_type'):
         #Adds FRQ types if RFAI was requested
         kwargs.get('form_type').append('FRQ')
     query = self.build_query(**kwargs)
     count = counts.count_estimate(query, models.db.session, threshold=5000)
     return utils.fetch_page(query, kwargs, model=models.Filings, count=count, multi=True)
开发者ID:18F,项目名称:openFEC,代码行数:7,代码来源:filings.py


示例2: get

 def get(self, committee_id=None, committee_type=None, **kwargs):
     query, reports_class, reports_schema = self.get_reports(committee_id, committee_type, kwargs)
     validator = args.IndexValidator(reports_class)
     for key in kwargs['sort']:
         validator(key)
     page = utils.fetch_page(query, kwargs, model=reports_class)
     return reports_schema().dump(page).data
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:7,代码来源:reports.py


示例3: get

 def get(self, committee_id, **kwargs):
     totals_class, totals_schema = totals_schema_map.get(
         self._resolve_committee_type(committee_id, kwargs), default_schemas
     )
     totals = self.get_totals(committee_id, totals_class, kwargs)
     page = utils.fetch_page(totals, kwargs)
     return totals_schema().dump(page).data
开发者ID:LetsUnlockiPhone,项目名称:openFEC,代码行数:7,代码来源:totals.py


示例4: get

 def get(self, *args, **kwargs):
     query = self.build_query(*args, **kwargs)
     count = counts.count_estimate(query, models.db.session, threshold=5000)
     return utils.fetch_page(
         query, kwargs,
         count=count, model=self.model, join_columns=self.join_columns, aliases=self.aliases,
         index_column=self.index_column, cap=self.cap,
     )
开发者ID:adborden,项目名称:openFEC,代码行数:8,代码来源:views.py


示例5: get

 def get(self, **kwargs):
     label_columns = [
         ScheduleABySize.size,
         sa.func.sum(ScheduleABySize.total).label('total'),
     ]
     group_columns = [ScheduleABySize.size]
     _, query = candidate_aggregate(ScheduleABySize, label_columns, group_columns, kwargs)
     return utils.fetch_page(query, kwargs, cap=None)
开发者ID:mulchy,项目名称:openFEC,代码行数:8,代码来源:candidate_aggregates.py


示例6: get

 def get(self, committee_id=None, committee_type=None, **kwargs):
     query, reports_class, reports_schema = self.build_query(
         committee_id=committee_id, committee_type=committee_type, **kwargs
     )
     if kwargs["sort"]:
         validator = args.IndexValidator(reports_class)
         validator(kwargs["sort"])
     page = utils.fetch_page(query, kwargs, model=reports_class)
     return reports_schema().dump(page).data
开发者ID:evaluation-alex,项目名称:openFEC,代码行数:9,代码来源:reports.py


示例7: get

 def get(self, committee_type=None, **kwargs):
     committee_id = kwargs.get('committee_id')
     query, reports_class, reports_schema = self.build_query(
         committee_type=committee_type,
         **kwargs
     )
     if kwargs['sort']:
         validator = args.IndicesValidator(reports_class)
         validator(kwargs['sort'])
     page = utils.fetch_page(query, kwargs, model=reports_class, multi=True)
     return reports_schema().dump(page).data
开发者ID:18F,项目名称:openFEC,代码行数:11,代码来源:reports.py


示例8: get

 def get(self, committee_id, **kwargs):
     totals_class, totals_schema = totals_schema_map.get(
         self._resolve_committee_type(committee_id, kwargs),
         default_schemas,
     )
     validator = args.IndexValidator(totals_class)
     for key in kwargs['sort']:
         validator(key)
     totals = self.get_totals(committee_id, totals_class, kwargs)
     page = utils.fetch_page(totals, kwargs, model=totals_class)
     return totals_schema().dump(page).data
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:11,代码来源:totals.py


示例9: get

 def get(self, **kwargs):
     query = candidate_aggregate(
         ScheduleAByState,
         [
             ScheduleAByState.state,
             sa.func.max(ScheduleAByState.state_full).label('state_full'),
         ],
         [ScheduleAByState.state],
         kwargs,
     )
     return utils.fetch_page(query, kwargs, cap=0)
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:11,代码来源:candidate_aggregates.py


示例10: get

 def get(self, candidate_id, **kwargs):
     totals_model = totals_model_map[candidate_id[0]]
     kwargs['candidate_id'] = [candidate_id]
     rows, aggregates = self._get_aggregates(kwargs, totals_model)
     latest = self._get_latest(rows, totals_model).subquery()
     aggregates = aggregates.subquery()
     query = db.session.query(
         aggregates,
         latest,
     ).join(
         latest,
         aggregates.c.cand_id == latest.c.cand_id,
     )
     return utils.fetch_page(query, kwargs)
开发者ID:Apeder,项目名称:openFEC,代码行数:14,代码来源:candidate_aggregates.py


示例11: get

 def get(self, **kwargs):
     query = self.model.query
     query = filter_query(self.model, query, self.filter_fields, kwargs)
     query = filter_upcoming(query, self.date_column, kwargs)
     return utils.fetch_page(query, kwargs, model=self.model)
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:5,代码来源:dates.py


示例12: get

 def get(self, **kwargs):
     query = self._get_records(kwargs)
     return utils.fetch_page(query, kwargs, cap=0)
开发者ID:18F,项目名称:openFEC,代码行数:3,代码来源:elections.py


示例13: get

 def get(self, committee_id=None, candidate_id=None, cycle=None, **kwargs):
     query = self.get_committee(committee_id, candidate_id, cycle, kwargs)
     return utils.fetch_page(query, kwargs)
开发者ID:LetsUnlockiPhone,项目名称:openFEC,代码行数:3,代码来源:committees.py


示例14: get

 def get(self, **kwargs):
     query = self.build_query(**kwargs)
     return utils.fetch_page(query, kwargs, model=self.model, join_columns=self.join_columns)
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:3,代码来源:views.py


示例15: get

 def get(self, **kwargs):
     query = models.Filings.query
     query = filter_query(models.Filings, query, fields, kwargs)
     query = utils.filter_range(query, kwargs, range_fields)
     count = counts.count_estimate(query, models.db.session, threshold=5000)
     return utils.fetch_page(query, kwargs, model=models.Filings, count=count)
开发者ID:EricSchles,项目名称:openFEC,代码行数:6,代码来源:filings.py


示例16: get

 def get(self, **kwargs):
     group_columns = [ScheduleAByContributorType.individual]
     query = candidate_aggregate(ScheduleAByContributorType, group_columns, group_columns, kwargs)
     return utils.fetch_page(query, kwargs, cap=0)
开发者ID:NoahKunin,项目名称:openFEC,代码行数:4,代码来源:candidate_aggregates.py


示例17: get

 def get(self, **kwargs):
     query = self.get_candidates(kwargs)
     return utils.fetch_page(query, kwargs, model=models.Candidate)
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:3,代码来源:candidates.py


示例18: get

 def get(self, committee_id=None, **kwargs):
     query = self.build_query(committee_id=committee_id, **kwargs)
     count = counts.count_estimate(query, models.db.session, threshold=5000)
     return utils.fetch_page(query, kwargs, model=self.model, count=count, index_column=self.index_column)
开发者ID:WhitTip,项目名称:openFEC,代码行数:4,代码来源:aggregates.py


示例19: get

 def get(self, committee_id=None, **kwargs):
     query = self._build_query(committee_id, kwargs)
     return utils.fetch_page(query, kwargs, model=self.model)
开发者ID:NoahKunin,项目名称:openFEC,代码行数:3,代码来源:aggregates.py


示例20: get

 def get(self, **kwargs):
     query = self.build_query(**kwargs)
     count = counts.count_estimate(query, models.db.session, threshold=5000)
     return utils.fetch_page(query, kwargs, model=models.Filings, count=count)
开发者ID:srinivasmalladi,项目名称:openFEC,代码行数:4,代码来源:filings.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python views.check_access函数代码示例发布时间:2022-05-26
下一篇:
Python utils.extend函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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