Python client for assemblee-nationale.fr website
Project description
# ANpy
A python client of the "api" of http://assemblee-nationale.fr website
[](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
* **QuestionSearchService** to search for questions
## Models
There is no real api provided by http://assemblee-nationale.fr so there is no real data model exposed by the website.
It is sometimes hard to remember what you can get from the response, so I chose to declare all parsed data fields in models even if it's quite heavy just because it's easier to remember them...
Python classes used are *Amendement*, **AmendementSummary**, **AmendementSearchResult**, **QuestionSummary** and **QuestionSearchResult**.
## CLI
A script anpy-cli.py is installed with the package, it provides the following commands :
* Show an amendement given its url :
```bash
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 :
```bash
python anpy-cli.py show_amendements_summary --start-date 2014-06-01
```
* Print amendements order for a given id_dossier and id_examen :
```bash
python anpy-cli.py show_amendements_order 33299 4073
```
* Show a question
```bash
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
[](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
* **QuestionSearchService** to search for questions
## Models
There is no real api provided by http://assemblee-nationale.fr so there is no real data model exposed by the website.
It is sometimes hard to remember what you can get from the response, so I chose to declare all parsed data fields in models even if it's quite heavy just because it's easier to remember them...
Python classes used are *Amendement*, **AmendementSummary**, **AmendementSearchResult**, **QuestionSummary** and **QuestionSearchResult**.
## CLI
A script anpy-cli.py is installed with the package, it provides the following commands :
* Show an amendement given its url :
```bash
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 :
```bash
python anpy-cli.py show_amendements_summary --start-date 2014-06-01
```
* Print amendements order for a given id_dossier and id_examen :
```bash
python anpy-cli.py show_amendements_order 33299 4073
```
* Show a question
```bash
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.7.tar.gz
(6.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
anpy-0.1.7-py2.py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file anpy-0.1.7.tar.gz.
File metadata
- Download URL: anpy-0.1.7.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1569a168deb4a149be34baa0fed6c708298775683bfe95104f0a991388d1bbde
|
|
| MD5 |
855774bdaa6b3ae03e8d2ea5538185fb
|
|
| BLAKE2b-256 |
8f3a2f11e30a01b90a1583880fabe59e2ec04a3fa94a2a708ec1b483444fd97c
|
File details
Details for the file anpy-0.1.7-py2.py3-none-any.whl.
File metadata
- Download URL: anpy-0.1.7-py2.py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92bdffdebb6277f76d1171b3c88a20e9ac6f162e1887aeaf2b6f9cd5ab97572e
|
|
| MD5 |
582be37fed1aa18c12caa62636d0682d
|
|
| BLAKE2b-256 |
481dead08d83c56bf7231823a5bf911153d563b99332469a811795913c3a0f26
|