Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abgeordnetenwatch_python-0.1.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abgeordnetenwatch_python-0.1.0-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file abgeordnetenwatch_python-0.1.0.tar.gz.

File metadata

File hashes

Hashes for abgeordnetenwatch_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1363470e3e2750ac9cce299979d13e9728ed05608a07cb3d9672e2e883fdc495
MD5 aac34bda3c7f8b8ecb708340f462c3b9
BLAKE2b-256 f6d407f837bf5c35041844884ec33e0587522d74edac9a406ddbe4f36fa774a8

See more details on using hashes here.

File details

Details for the file abgeordnetenwatch_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for abgeordnetenwatch_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c473b582e4c79705d76e953e6489dab9f719dcea308c884f1df4950cbb8b8e5
MD5 5de9497ce5cdfacf9fdf3a353bf1e1c1
BLAKE2b-256 3cff3d4a81a3532eab3a2dff6466793fd397da77ea18728c2c4773d3f587440d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page