ds_provider_simployer_py_lib.linked_service.simployer¶
File: simployer.py
Region: ds_provider_simployer_py_lib/linked_service/simployer
Simployer Linked Service
This module implements a linked service for Simployer, allowing users to connect to and interact with Simployer instance using client credentials.
Example
>>> from uuid import uuid4
>>> linked_service = SimployerLinkedService(
... settings=SimployerLinkedServiceSettings(
... client_id="your_client_id",
... client_secret="your_client_secret",
... ),
... id=uuid4(),
... name="simployer-connection",
... version="1.0.0",
... description="Simployer API connection"
... )
>>> # For testing credentials
>>> success, message = linked_service.test_connection()
>>> # For actual usage with persistent connection
>>> linked_service.connect()
>>> try:
... session = linked_service.session # Use session for API calls
... finally:
... linked_service.close()
Attributes¶
Classes¶
Settings required to connect to Simployer API using client credentials. |
|
Linked service for connecting to Simployer using client credentials. |
Module Contents¶
- ds_provider_simployer_py_lib.linked_service.simployer.logger¶
- class ds_provider_simployer_py_lib.linked_service.simployer.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.
- ds_provider_simployer_py_lib.linked_service.simployer.SimployerLinkedServiceSettingsType¶
- class ds_provider_simployer_py_lib.linked_service.simployer.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