Skip to main content

Search for official documents of the Dutch Lower House (Tweede Kamer) and extract relevant data.

Note that this is work in progress. The package may not work properly. Currently only queries for motions (moties) and amendments (amendementen) are supported.

Installation

pip install tkdocs

Simple example

from tkdocs import query_tk

data = {
    'query': 'referentiewaarden,minimumloon',
    'fromdate': '2017-03-15',
    'todate': '2023-01-01',
    'operator': 'and',
    'doc_type': 'motie',
    'dir_results': '../data/wml',
    'download_files': True
}

query_tk(**data)

This will search for motions with search query referentiewaarden AND minimumloon, between 15 March 2017 and 1 January 2023.

Results will be stored as an excel file containing data including date, title, who sponsored the motion, and how parties voted (../data/wml/results.xlsx; make sure dir_results points to a location where the results can be stored). Since download_files was set to True, the pdf’s containing the motion text will be downloaded as well, and stored in ../data/wml/files.

Als long as you don’t change dir_results, results will be merged if you do multiple queries.

Currently, a maximum of 5,000 results will be downloaded. If a query yields more than 5,000 results, use fromdate and todate to get all results in batches of max 5,000.

For all options, see help(query_tk).

Metadata

Release files for tkdocs 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkdocs 0.0.6
File Size Uploaded Provenance Actions
tkdocs-0.0.6.tar.gz 6.3 kB Without provenance Details for tkdocs-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tkdocs 0.0.6
File Interpreter ABI Platform Actions
tkdocs-0.0.6-py3-none-any.whl Python 3 none any Details for tkdocs-0.0.6-py3-none-any.whl

Total release size: 12.8 kB

Release files / tkdocs-0.0.6.tar.gz

Download URL tkdocs-0.0.6.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c54947a35508cd64d56229aca91accba86e9534c8c16548df18f51a0acfbd2a5
BLAKE2b-256 checksum
How to use checksums
6da26dc14766089ea150688184e0aa7fba9e8fb4da3ce76e855f07f07ad353be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / tkdocs-0.0.6-py3-none-any.whl

Download URL tkdocs-0.0.6-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
576814c89c2b34bd019999b26f4fe73eb6f04fd83f3f5bf57f06246230e52a04
BLAKE2b-256 checksum
How to use checksums
09f6a1fd07ec0d141b154de2cd8ae2e328c9b26012fce984cb0cdbc30f629725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Security for tkdocs 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page