Skip to main content

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}")

Release files for mosaic-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mosaic-client 0.1.0
File Size Uploaded
mosaic-client-0.1.0.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mosaic-client 0.1.0
File Interpreter ABI Platform
mosaic_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / mosaic-client-0.1.0.tar.gz

Download URL mosaic-client-0.1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
78b7182b895337d79bbea32f2f180a6d6e5c8e39201fa3f887e72ddb5c6cce1c
BLAKE2b-256 checksum
How to use checksums
153e8b51fc57e9840064096000de463f00790d80b776c9aaeeb81d3954f00984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.5 Linux/5.15.48-1-lts

Release files / mosaic_client-0.1.0-py3-none-any.whl

Download URL mosaic_client-0.1.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c3dd9ef1df004c7f5b4eb8691c704ab88da894df5899ce9e7bcbae5a6fda6d4
BLAKE2b-256 checksum
How to use checksums
1ea874f0d31cc283b5346fa7785478681d6e211981a292ee4467a433b4c58a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.5 Linux/5.15.48-1-lts

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page