Skip to main content

Python API wrapper for the OpenKVK service

Project description

OpenKVK: API wrapper

| |pypi|
| |Build Status|
| |License|

What is it ?

OpenKVK is an UNOFFICIAL python wrapper for the `openkvk API`_

Main Features

a few of the things this library does well:

- Get dutch company information by name or kvk-number
- Get lists of companies based on sbi-codes, location or both
- Output information in ``json``, ``csv`` or ``dict``
- Wrap your own queries with or without result parsing

Command line interface

For quick access to the openkvk api you could use the OpenKVK CLI, like

.. code::

$ openkvk --help
$ openkvk --kvk 27312152 --format json --output test.json


| The source code is currently hosted on GitHub at:

Install via ``pip``:

.. code::

$ pip install OpenKVK

And via ``easy_install``:

.. code::

$ easy_install OpenKVK


First you need to instantiate a OpenKVK client

.. code::

from OpenKVKimport ApiClient

client = ApiClient()

| The Client returns data as python dicts, to change this output format.
| you could do one of the following

.. code::

client = ApiClient('json')


.. code::


The client can then be used to query by using the following:

.. code::


| The ``city``, ``name`` and ``sbi`` functions also accept a maximum number of results (defaults to 99)
| and a additional filters, like:

.. code::

client.get_by_sbi('06.10',limit=150, plaats="Rotterdam")

for a full list of available filters check `openkvk`_

| If you like to construct you own SQL-queries and you like the results to be parsed to a valid JSON array, a python list of dicts or a valid csv
| you could use the ``QueryBuilder`` class.

.. code::

from OpenKVK import QueryBuilder

client = QueryBuilder()
client.query("SELECT * FROM kvk WHERE kvks = 27312152")

If you don’t want the parsed results there is also a very minimalistic
api client

.. code::

from OpenKVK import BaseClient

client = BaseClient()
client.query("SELECT * FROM kvk WHERE kvks = 27312152")



.. _openkvk API:
.. _openkvk:

.. |pypi| image::
.. |Build Status| image::
.. |License| image::
Version 0.3

- Added python 3 support
- Fixxed additional filters
- Updated documentation

Version 0.2

- Added Commandline interface
- Added method for querying bankruptcies
- Added tests
- Added
- Restructured classes
- Fixed csv output
- Fixed get_by_kvk() method

Version 0.1

First public preview release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for OpenKVK, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size (377.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page