Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

tkapi

PyPI version
Python ORM and bindings for the Tweede Kamer Open Data Portaal OData API.

A pure Python interface for the Tweede Kamer API with type annotations for easy data model discovery.

Requires Python 3.5+.

Please create an issue if you have any problems, questions or suggestions.

Installation

pip install tkapi

Authentication

You need to whitelist your IP by registering at https://opendata.tweedekamer.nl.

Data model

See Open Kamer Data Model documentation for the data model that is mapped to Python classes.

Usage

A simple first example,

import tkapi

api = tkapi.TKApi()
personen = api.get_personen(max_items=100)
for persoon in personen:
    print(persoon.achternaam)

For more examples see the examples and tests.

Entities

See Tweede Kamer documentation for details.

Algemeen Persoon Fractie Commissie
Activiteit Persoon Fractie Commissie
ActiviteitActor PersoonContactinformatie FractieAanvullendGegeven CommissieContactinformatie
Agendapunt PersoonFunctie FractieZetel CommissieZetel
Besluit PersoonGeschenk FractieZetelPersoon CommissieZetelVastPersoon
Document PersoonLoopbaan FractieZetelVacature CommissieZetelVastVacature
DocumentActor PersoonNevenfunctie CommissieZetelVervangerPersoon
DocumentVersie PersoonNevenfunctieInkomsten CommissieZetelVervangerVacature
Kamerstukdossier PersoonOnderwijs
Reservering PersoonReis
Stemming
Vergadering
Verslag
Zaak
ZaakActor
Zaal

Development

Tests

Run all tests,

python -m unittest discover

Coverage report

Run all tests,

coverage run -m unittest discover

Create coverage report,

coverage html

Then visit htmlcov/index.html in your browser.

About

Python bindings for the Tweede Kamer OData API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages