Skip to content

Bluemi/abgeordnetenwatch-python

Repository files navigation

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.

pip install abgeordnetenwatch-python

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

Convert json files to txt:

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 simultaneously
load_parliament_qa bundestag -t 16

# for more options
load_parliament_qa --help

About

Small utility programs to use the abgeordnetenwatch-api in python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published