anpy 0.1.2dev
pip install anpy==0.1.2dev
Newer version available (0.2.1)
Released:
Python client for assemblee-nationale.fr website
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: François Massot
- Tags scraping, politics, data
Classifiers
- Development Status
- License
- Operating System
- Programming Language
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
* **QuestionService** 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 :
```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
[](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
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 :
```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
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: François Massot
- Tags scraping, politics, data
Classifiers
- Development Status
- License
- Operating System
- Programming Language
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
Built Distribution
File details
Details for the file anpy-0.1.2dev.tar.gz
.
File metadata
- Download URL: anpy-0.1.2dev.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59a37a92c269563af9f30b907fa573df7d2f0b21505376ee2f13a7bd289e3ee |
|
MD5 | dbd856e533eafba05eb8be2e1c57b926 |
|
BLAKE2b-256 | 9284057116c0c9984e06e9d0525ea442a78b0ade5cabdc3378b8770ecf50d611 |
File details
Details for the file anpy-0.1.2dev-py2.py3-none-any.whl
.
File metadata
- Download URL: anpy-0.1.2dev-py2.py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f49c25384c45f6e1e79ec305b334431ab34d8e64ce28514fe1f2310bdbb8ff46 |
|
MD5 | 9415cbbdd556189b6ae0eca7fbc389c4 |
|
BLAKE2b-256 | e12f51c3bf15b547b0910354ba0046abb7b9230f2be794439339e8bd18852066 |