Python client for assemblee-nationale.fr website
Project description
# ANpy
A python client of the "api" of http://assemblee-nationale.fr website
[![Build Status](https://travis-ci.org/fmassot/rc-tools.svg)](https://travis-ci.org/fmassot/anpy)
## Main goal
Retrieve painlessly json data from assemblee-nationale.fr
## Install :
```bash
pip install anpy
```
## Search services
Currently, only two search services are provided :
* **AmendementSearchService** to search for amendements
* **QuestionService** to search for questions
## Models
All results coming from http://assemblee-nationale.fr are parsed and instanciate custom python classes *Amendement*, **AmendementSummary**, **AmendementSearchResult**, **QuestionSummary** and **QuestionSearchResult**.
The idea was to declare all data fields provided by website because it's easier to remember them... the consistency of variables' names coming fromassemblee-nationale.fr is not always easy to understand.
## CLI
A script anpy-cli.py is installed with the package, it provides the following commands :
* Show an amendement given its url :
```python
python anpy-cli.py show_amendement http://www.assemblee-nationale.fr/14/amendements/1847/CION-DVP/CD266.asp
```
* Show amendements summaries after a given date :
```python
python anpy-cli.py show_amendements_summary --start-date 2014-06-01
```
* Print amendements order for a given id_dossier and id_examen :
```python
python anpy-cli.py show_amendements_order 33299 4073
```
* Show a question
```python
python anpy-cli.py show_question http://questions.assemblee-nationale.fr/q14/14-73499QE.htm
```
A python client of the "api" of http://assemblee-nationale.fr website
[![Build Status](https://travis-ci.org/fmassot/rc-tools.svg)](https://travis-ci.org/fmassot/anpy)
## Main goal
Retrieve painlessly json data from assemblee-nationale.fr
## Install :
```bash
pip install anpy
```
## Search services
Currently, only two search services are provided :
* **AmendementSearchService** to search for amendements
* **QuestionService** to search for questions
## Models
All results coming from http://assemblee-nationale.fr are parsed and instanciate custom python classes *Amendement*, **AmendementSummary**, **AmendementSearchResult**, **QuestionSummary** and **QuestionSearchResult**.
The idea was to declare all data fields provided by website because it's easier to remember them... the consistency of variables' names coming fromassemblee-nationale.fr is not always easy to understand.
## CLI
A script anpy-cli.py is installed with the package, it provides the following commands :
* Show an amendement given its url :
```python
python anpy-cli.py show_amendement http://www.assemblee-nationale.fr/14/amendements/1847/CION-DVP/CD266.asp
```
* Show amendements summaries after a given date :
```python
python anpy-cli.py show_amendements_summary --start-date 2014-06-01
```
* Print amendements order for a given id_dossier and id_examen :
```python
python anpy-cli.py show_amendements_order 33299 4073
```
* Show a question
```python
python anpy-cli.py show_question http://questions.assemblee-nationale.fr/q14/14-73499QE.htm
```
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
anpy-0.1.1dev.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for anpy-0.1.1dev-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e03579845aded3ebbfedff65458df7d1ba25ad0dd6f57dea079975b0240fb8eb |
|
MD5 | b100bf3e31e10723fd69625da31617e9 |
|
BLAKE2b-256 | cc440dad4cd35245b6be2fabf7e1837c43f7a2ef0457f4186df75d9e4cb989ce |