Fetch questions and answers from german politicians via python classes.
Project description
abgeordnetenwatch-python
Siehe hier für die deutsche Anleitung.
Small utility programs to use the abgeordnetenwatch-api in python.
Installation
To use this script, install python3 and pip.
Install requirements with
pip install .
Usage
You can download all questions and answers from a politician with the following script:
# -v for verbose output
load_questions_answers --firstname "Angela" --lastname "Merkel"
# for more options
load_questions_answers --help
This will create a file data/json/079137_Angela_Merkel.json with all questions and answers of the specified person.
Converting to txt files
To convert json files to txt, do the following:
convert_qa data/json data/txt txt
# convert to csv
convert_qa data/json data/csv csv
This will create a file data/txt/079137_Angela_Merkel.txt (for all files in data/json).
Load Parliament
To fetch all questions and answers from all politicians from a parliament, you can do the following:
# load "bundestag" using 16 requests simulaneously
load_parliament_qa bundestag -t 16
# for more options
load_parliament_qa --help
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
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
File details
Details for the file abgeordnetenwatch_python-0.1.0.tar.gz.
File metadata
- Download URL: abgeordnetenwatch_python-0.1.0.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1363470e3e2750ac9cce299979d13e9728ed05608a07cb3d9672e2e883fdc495
|
|
| MD5 |
aac34bda3c7f8b8ecb708340f462c3b9
|
|
| BLAKE2b-256 |
f6d407f837bf5c35041844884ec33e0587522d74edac9a406ddbe4f36fa774a8
|
File details
Details for the file abgeordnetenwatch_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: abgeordnetenwatch_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c473b582e4c79705d76e953e6489dab9f719dcea308c884f1df4950cbb8b8e5
|
|
| MD5 |
5de9497ce5cdfacf9fdf3a353bf1e1c1
|
|
| BLAKE2b-256 |
3cff3d4a81a3532eab3a2dff6466793fd397da77ea18728c2c4773d3f587440d
|