用于nosdeputes.fr和nossenateurs.fr的python api
cpc_api的Python项目详细描述
[![生成状态](https://travis-ci.org/regardscitoyens/cpc-api.svg)](https://travis-ci.org/regardscitoyens/cpc-api)
#CPC-API标准 用于http://nosdeputes.fr和http://nossenateurs.fr
的python apicpc用于controle parlementaire citoyens。
请参阅此处的完整API文档:https://github.com/regardscitoyens/nosdeputes.fr/blob/master/doc/api.md
##示例
- Députes
`python from cpc_api import CPCApi api = CPCApi(legislature='2012-2017') # synthese of legislature synthese = api.synthese() # search for a depute cope = api.search_parlementaires('Cope')[0][0] # get all info of cope all_info = api.parlementaire(cope['slug']) `
- Sénateurs & députés legislature 2007-2012…
`python from cpc_api import CPCApi # do the same with senateurs api = CPCApi(ptype='senateur') larcher = api.search_parlementaires('larcher')[0][0] # 'or with legislature 2007-2012' api = CPCApi(ptype='depute',legislature='2007-2012') morano = api.search_parlementaires('morano')[0][0] # ... `