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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_serviceplatformen-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82afffb0844d59e713c3dbad9ae1fa6badc5c3f6532f0739a5fe725ec270ae7a |
|
MD5 | 59b2794240e9471feee7f1a3ebf6bf0a |
|
BLAKE2b-256 | 879190edfb11e59a6307be387d8e172a4e33fa9578b00c7c8a2c92d7efe68fac |
Hashes for python_serviceplatformen-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06e22910d9087a3ca8ac0496f3e975ec7e1c7abc9f1acea5e9d558941ef261ae |
|
MD5 | 33db442d7a8957874522f3fcdb1ccf2b |
|
BLAKE2b-256 | 38b22649a5e3b88d3e6beeb7e2836d5a388c5bb1d7ada41de3bd207855d8569f |