Skip to main content

A package to download Dutch parliament debates and subtitles

Project description

tweedekamer

A pypi package for retrieving Dutch parliamentary debate data.

Using this package you can download Dutch parliament debates and subtitles. It is based on the website https://debatgemist.tweedekamer.nl. This package is not affiliated with the Dutch parliament. It is not allowed to use this package for commercial purposes.

This package is no longer in beta, but you still might expect bugs and missing features as the testing library is not finished.

Installation

Install this package through pip. The package requires Python >=3.7.9

  pip install tweedekamer

Usage/Examples

Retrieving subtitles

from tweedekamer import Search

results = Search("belasting 2022", limit=1).result
results[0].subtitle.text

Retrieving video link

from tweedekamer import Search

results = Search("belasting 2022", limit=1).result
results[0].video.url

Retrieving speaker information

For each debate there is a list of speakers

from tweedekamer import Search

results = Search("belasting 2022", limit=1).result
results[0].speakers[0].name
results[0].speakers[0].party

results[0].speakers[0].speach.text
results[0].speakers[0].speach.subtitle
results[0].speakers[0].speach.tokenized

Export to CSV

Export the results of your query to CSV, separate the data by speaker or keep the entire debate per row

from tweedekamer import Search

Search("belasting 2022", limit=1).to_csv("entire_debate")
Search("belasting 2022", limit=1).to_csv("debate_per_speaker", separate_speakers=True)

Features

  • Retrieve date and info on debate
  • Search debates by query, date range, and debate type
  • Retrieve subtitle data
  • Retrieve video data

Run Locally

Use these instructions if you want to edit the package locally

Clone the project

  git clone https://github.com/micheldore/tweedekamer

Go to the project directory

  cd tweedekamer

Create the virtual environment (using Python 3)

  python -m venv env
  source env/bin/activate

Install dependencies

  pip install -r requirements.txt

If you want to install the local version of the package

  python -m pip install -e .

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

tweedekamer-0.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

tweedekamer-0.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file tweedekamer-0.1.1.tar.gz.

File metadata

  • Download URL: tweedekamer-0.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for tweedekamer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3ca4874965dd98acb7203ed671bbdf324edfd542fbaeea66f6a990823afe54f6
MD5 1c5a07184db3c7aa5cc994b6609d0252
BLAKE2b-256 c10f8a868ab3e8f5d4328e7784e8e2d2496880f4ff5dc01767ab4b42cc863916

See more details on using hashes here.

File details

Details for the file tweedekamer-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tweedekamer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for tweedekamer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f09bdd3f81cbc0b9d3a4c5a876fe5a5625dd525358b69edb211706f906f348cd
MD5 2f34a15402746b9b71048bcb3683fe29
BLAKE2b-256 b1909c930bead4ff6097072cadd6a79e91d5593d32492c95e4803a8747518409

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