跳转到主要内容

nosdeputes.fr和nossenateurs.fr的Python API

项目描述

[![构建状态](https://travis-ci.org/regardscitoyens/cpc-api.svg)](https://travis-ci.org/regardscitoyens/cpc-api)

# CPC-API A python api for http://nosdeputes.fr and http://nossenateurs.fr

CPC代表公民议会控制。

在此处查看完整的API文档:https://github.com/regardscitoyens/nosdeputes.fr/blob/master/doc/api.md

## 示例

  • 议员

`python from cpc_api import CPCApi api = CPCApi(legislature='2012-2017') # 立法会综合报告 synthese = api.synthese() # 搜索议员 cope = api.search_parlementaires('Cope')[0][0] # 获取cope的所有信息 all_info = api.parlementaire(cope['slug']) `

  • 2007-2012届参议员和议员...

`python from cpc_api import CPCApi # 使用参议员进行相同的操作 api = CPCApi(ptype='senateur') larcher = api.search_parlementaires('larcher')[0][0] # '或使用立法会 2007-2012' api = CPCApi(ptype='depute', legislature='2007-2012') morano = api.search_parlementaires('morano')[0][0] # ... `

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码发行版

cpc_api-0.1.6.tar.gz (2.8 kB 查看散列)

上传时间 源代码

由以下支持