Skip to main content

Python modules for easier use of Kombit's serviceplatformen.

Project description

python_serviceplatformen

This project is made to hopefully make it easier to use Kombit's Serviceplatformen API.

Certificates and authentication

To use Kombit's Serviceplatformen you need a valid OCES3 certificate registered for your project. Ask your local Kombit systems architect for help with this.

You need specific access to each service on Serviceplatformen you want to use. One certificate can have access to multiple services.

This project needs your certificate to be in a unified PEM format. That is with the public and private key in a single file.

If your certificate is in P12-format you can convert it using openssl:

openssl pkcs12 -in Certificate.p12 -out Certificate.pem -nodes

Due to limitations in Python's implementation of SSL your certificate needs to exist as a file on the system while using this library.

When your certificate is registered and in PEM-format, you simply hand it to the KombitAccess class and it will handle the rest for you.

from python_serviceplatformen.authentication import KombitAccess
ka = KombitAccess(cvr=cvr, cert_path=cert_path)

Tests

This project contains automated tests in the "tests" folder. To run these test you need to install the developer dependecies:

pip install python_serviceplatformen[dev]

Environment variables

Create a .env file in the project folder and fill out these variables:

KOMBIT_TEST_CVR = "XXXXXXXX"  # The cvr of the organization who owns the certificate
KOMBIT_TEST_CERT_PATH = "C:\something\Certificate.pem"  # The path to the certificate file

Project details


Download files

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

Source Distribution

python_serviceplatformen-1.0.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

python_serviceplatformen-1.0.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

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