Skip to main content

KOMBIT client provides easy connection to webservices from KOMBIT / Serviceplatformen / digitaliseringskataloget.

Project description

kombit-client

A Python client for connecting to Danish government web services via KOMBIT Serviceplatformen. The package wraps a .NET library using pythonnet, exposing a clean Python API with Pythonic naming conventions.

Requirements

Installation

pip install kombit-client

Overview

All configuration is handled via environment variables. You must set the following variables before using the client:

Environment Variable Description
CERT_BASE_PATH Directory containing all certificate files
CLIENT_CERT Filename of client certificate (e.g., client.p12)
CLIENT_CERT_BASE64 (Optional) client certificate as a base64 string
CLIENT_PASS (Optional) Password for client certificate
ROOT_CERT (Optional) Filename of the root certificate (needs to be added to trust store)
ACCESS_CONTROL_CERT (Optional) Filename of the STS/Access Control certificate
SIGNING_CERT (Optional) Filename of the Service Provider signing certificate
STS_ENDPOINT_ADDRESS (Optional) URL of the STS endpoint
STS_ENDPOINT_ID (Optional) Entity identifier for the STS

If optional variables are not set, defaults will be used as defined in the code. All certificate paths are constructed as os.path.join(CERT_BASE_PATH, <filename>).


Integrations

SF1520 – CPR replika opslag

Lookup person base data from CPR via SF1520.

Services

PersonBaseDataExtendedService

This service allows public authorities' user systems to retrieve personal information.

from kombit_client.integrations.sf1520 import PersonBaseDataExtendedClient

client = PersonBaseDataExtendedClient(
    cvr="<organisation's CVR>"
)

result = client.person_lookup(pnr="<a civil registration number>")
# Returns a dict with person base data

SF0770A – SKAT Indkomst - Opslag personoplysninger

Retrieve income data from SKAT via SF0770_A.

Services

SKATForwardEIndkomstService

Synchronous web service that allows you to retrieve income information.

The current implementaion only allows retrieving income information for private individuals.

Useful docs:

Code example

from kombit_client.integrations.sf0770a import SKATForwardEIndkomstClient

client = SKATForwardEIndkomstClient(
    cvr="<organisation's CVR number>",
    virksomhed_se_nummer_identifikator="<organisation's SE number>",
    abonnement_type_kode="<subscription type code>",
    abonnent_type_kode="<subscriber type code>",
    adgang_formaal_type_kode="<purpose of access code>"
)

result = client.indkomstoplysninger_laes(
    person_civil_registration_identifier="<a civil registration number>",
    soege_aar_maaned_fra_kode="202401",
    soege_aar_maaned_til_kode="202403",
)
# Returns a dict with income data for the given period

The soege_aar_maaned_fra_kode and soege_aar_maaned_til_kode parameters are year-month strings in YYYYMM format defining the search period.


License

MIT – see LICENSE for details.

Authors

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kombit_client-1.0.0-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file kombit_client-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: kombit_client-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for kombit_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee76dc6db7e58f92242a16163296d73a076d3ce024373c66837ded99bf17a45d
MD5 784e51002e7cfccec36fe5928d70f47f
BLAKE2b-256 49e90df79aa89cedb062a6d0767b4c60ce6eac9d7080298172548a03b5ab058f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page