Python bindings for the Tweede Kamer Open Data Portaal OData API.
Requires Python 3.3+
WARNING: This is a work in progress. Code is not clean, nor complete. There will be major changes that break everything!
You are welcome to open an issue if you have any problems, questions or suggestions.
pip install tkapi
A simple first example,
import tkapi
api = tkapi.Api(user=USERNAME, password=PASSWORD)
personen = api.get_personen(max_items=100)
for persoon in personen:
print(persoon.achternaam)
Where USERNAME
and PASSWORD
are your Tweede Kamer OpenData username and password.
You can get one by registering at https://opendata.tweedekamer.nl.
The tests can serve as more detailed examples.
Run all tests,
python -m unittest discover
Run all tests,
coverage -m unittest discover
Create coverage report,
coverage html
Then visit htmlcov/index.html in your browser.