ds_provider_simployer_py_lib.linked_service¶
File: __init__.py
Region: ds_provider_simployer_py_lib/linked_service
Simployer Linked Service
This module implements a linked service for Simployer and provides a session.
Example
>>> from uuid import UUID
>>> linked_service = SimployerLinkedService(
... id=UUID("00000000-0000-0000-0000-000000000000"),
... name="test-name",
... version="1.0.0",
... settings=SimployerLinkedServiceSettings(
... client_id="your_client_id",
... client_secret="your_client_secret",
... ),
... )
>>> linked_service.connect()
>>> linked_service.test_connection()
Submodules¶
Classes¶
Linked service for connecting to Simployer using client credentials. |
|
Settings required to connect to Simployer API using client credentials. |
Package Contents¶
- class ds_provider_simployer_py_lib.linked_service.SimployerLinkedService[source]¶
Bases:
ds_protocol_http_py_lib.HttpLinkedService[SimployerLinkedServiceSettingsType],Generic[SimployerLinkedServiceSettingsType]Linked service for connecting to Simployer using client credentials.
- settings: SimployerLinkedServiceSettingsType¶
- property type: ds_provider_simployer_py_lib.enums.ResourceType¶
Get the type of the linked service.
- Returns:
ResourceType
- __post_init__() None[source]¶
Post-init method to set up the linked service.
If self.settings.custom is None and auth_type is CUSTOM, populates custom with default OAuth2 client credentials settings. This allows callers to preconfigure custom auth settings or subclasses to override the behavior.
- Returns:
None
- class ds_provider_simployer_py_lib.linked_service.SimployerLinkedServiceSettings[source]¶
Bases:
ds_protocol_http_py_lib.HttpLinkedServiceSettingsSettings required to connect to Simployer API using client credentials.
- client_id¶
Client ID for authentication
- client_secret¶
Client secret for authentication
- token_endpoint¶
Token endpoint (default: https://simplauth.simployer.com/oauth/token)
- audience¶
Audience identifier (default: https://hrconnect.simployer.com)
- api_version¶
API version to use (default: v1)
- host¶
API host URL (default: https://hrconnect.simployer.com)
- auth_type¶
Authentication type (default: CUSTOM)
- custom¶
Custom authentication settings, required if auth_type is CUSTOM
- client_id: str¶
The client ID for authentication.
- client_secret: str¶
The client secret for authentication.
- token_endpoint: str = 'https://simplauth.simployer.com/oauth/token'¶
The token endpoint URL.
- audience: str = 'https://hrconnect.simployer.com'¶
The audience identifier.
- api_version: str = 'v1'¶
The API version to use.
- host: str = 'https://hrconnect.simployer.com'¶
The API host URL.
- auth_type: ds_protocol_http_py_lib.enums.AuthType¶
The authentication type to use.
- custom: ds_protocol_http_py_lib.linked_service.CustomAuthSettings | None = None¶
Custom authentication settings, required if auth_type is CUSTOM.