Python api for nosdeputes.fr and nossenatures.fr
Project description
# CPC-API
A python api for http://nosdeputes.fr and http://nossenateurs.fr. Project wiki is here http://cpc.regardscitoyens.org/trac/wiki.
[![Build Status](https://travis-ci.org/fmassot/cpc-api.svg)](https://travis-ci.org/fmassot/cpc-api)
## Examples
* Députes
```python
from cpc_api import CPCApi
api = CPCApi()
# synthese of last 12 month
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, legislature 2007-2012
```python
# do the same with senateurs
api = CPCApi(ptype='senateur')
print 'or with legislature 2007-2012'
api = CPCApi(ptype='senateur', legislature='2007-2012')
# ...
```
A python api for http://nosdeputes.fr and http://nossenateurs.fr. Project wiki is here http://cpc.regardscitoyens.org/trac/wiki.
[![Build Status](https://travis-ci.org/fmassot/cpc-api.svg)](https://travis-ci.org/fmassot/cpc-api)
## Examples
* Députes
```python
from cpc_api import CPCApi
api = CPCApi()
# synthese of last 12 month
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, legislature 2007-2012
```python
# do the same with senateurs
api = CPCApi(ptype='senateur')
print 'or with legislature 2007-2012'
api = CPCApi(ptype='senateur', legislature='2007-2012')
# ...
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cpc_api-0.1.0dev.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for cpc_api-0.1.0dev-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db9c670949d983d41e47b0b707da9180bb0fcb233d9c0e94123651e3664e60ac |
|
MD5 | 4a7278ab6600f7c40e17ebb63d5ef644 |
|
BLAKE2b-256 | 387c27250115a58fed80105395898c301e343bd8c75ace1a013f60c57a1c7baf |