Skip to main content

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')
# ...
```

Project details


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)

Uploaded Source

Built Distribution

cpc_api-0.1.0dev-py2-none-any.whl (4.2 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page