Easy consumption of SOAP interfaces provided by E-PIX and gPAS of the MOSAIC suite
Project description
MOSAIC client
The mosaic_client
library provides wrappers around the SOAP interfaces of E-PIX and gPAS by the THS Greifswald.
The main entrypoints are mosaic_client.EPIXClient
and mosaic_client.GPASClient
, which are classes that simply take the URL to the WSDL endpoint of their respective services and expose functions to interact with the services.
Documentation
The documentation of the latest commit on the master
branch can be seen on GitLab.
Installation
Run pip install mosaic_client
.
You can then import the mosaic_client
module in your project.
Usage
This is an example for requesting a new MPI for an identity. It is assumed that first and last name, gender and birthdate are required and that there exists a data domain called "default" and a source called "dummy_safe_source".
from datetime import datetime, timezone
from mosaic_client.epix import EPIXClient
from mosaic_client import Identity
epix = EPIXClient("http://localhost:8080/epix/epixService?wsdl")
mpi_response = epix.request_mpi("default", "dummy_safe_source", Identity(
first_name="Foo",
last_name="Bar",
gender="M",
birth_date=datetime(1970, 1, 1, tzinfo=timezone.utc)
))
# prints out the MPI assigned to the identity
print(f"MPI: {mpi_response.person.mpi()}")
The same works with gPAS. Simply provide the WSDL endpoint URL and use the provided methods as you please. In this example, a new pseudonym is requested inside the "default" domain.
from mosaic_client.gpas import GPASClient
gpas = GPASClient("http://localhost:8080/gpas/gpasService?wsdl")
psn = gpas.get_or_create_pseudonym_for("default", "value123")
# prints out the generated pseudonym
print(f"Pseudonym: {psn}")
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
File details
Details for the file mosaic-client-0.1.0.tar.gz
.
File metadata
- Download URL: mosaic-client-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.15.48-1-lts
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b7182b895337d79bbea32f2f180a6d6e5c8e39201fa3f887e72ddb5c6cce1c |
|
MD5 | 7a46835adc8a8097d12f36bfd034786c |
|
BLAKE2b-256 | 153e8b51fc57e9840064096000de463f00790d80b776c9aaeeb81d3954f00984 |
File details
Details for the file mosaic_client-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mosaic_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.15.48-1-lts
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c3dd9ef1df004c7f5b4eb8691c704ab88da894df5899ce9e7bcbae5a6fda6d4 |
|
MD5 | 83c825702065e6fd764135f6197cab12 |
|
BLAKE2b-256 | 1ea874f0d31cc283b5346fa7785478681d6e211981a292ee4467a433b4c58a26 |