Git Product home page Git Product logo

tkapi's Introduction

tkapi

PyPI version CI/CD status
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

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.

tkapi's People

Contributors

bartromgens avatar florishoogenboom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.