imednet package

The main SDK classes are available directly from the package root:

from imednet import ImednetSDK, AsyncImednetSDK

Subpackages

Submodules

imednet.sdk module

Public entry-point for the iMednet SDK.

This module provides the ImednetSDK class which: - Manages configuration and authentication - Exposes all endpoint functionality through a unified interface - Provides context management for proper resource cleanup

class imednet.sdk.AsyncImednetSDK(*args, **kwargs)[source]

Bases: ImednetSDK

Async variant of ImednetSDK using the async HTTP client.

Parameters:
  • args (Any) –

  • kwargs (Any) –

class imednet.sdk.ImednetSDK(api_key=None, security_key=None, base_url=None, timeout=30.0, retries=3, backoff_factor=1.0, retry_policy=None, enable_async=False, client=None, async_client=None)[source]

Bases: SDKConvenienceMixin

Public entry-point for library users.

Provides access to all iMednet API endpoints and maintains configuration.

Parameters:
  • api_key (Optional[str]) –

  • security_key (Optional[str]) –

  • base_url (Optional[str]) –

  • timeout (float) –

  • retries (int) –

  • backoff_factor (float) –

  • retry_policy (RetryPolicy | None) –

  • enable_async (bool) –

  • client (Optional[Client]) –

  • async_client (Optional[AsyncClient]) –

async aclose()[source]
Return type:

None

clear_default_study()[source]

Clear the default study key.

Return type:

None

close()[source]

Close the client connection and free resources.

Return type:

None

codings: CodingsEndpoint
config: Config
forms: FormsEndpoint
intervals: IntervalsEndpoint
jobs: JobsEndpoint
queries: QueriesEndpoint
record_revisions: RecordRevisionsEndpoint
records: RecordsEndpoint
property retry_policy: RetryPolicy
set_default_study(study_key)[source]

Set the default study key for subsequent API calls.

Parameters:

study_key (str) – The study key to use as default.

Return type:

None

sites: SitesEndpoint
studies: StudiesEndpoint
subjects: SubjectsEndpoint
users: UsersEndpoint
variables: VariablesEndpoint
visits: VisitsEndpoint

imednet.async_sdk module

imednet.discovery module

Runtime discovery utilities for live tests and scripts.

exception imednet.discovery.NoLiveDataError[source]

Bases: RuntimeError

Raised when required live data cannot be found.

imednet.discovery.discover_form_key(sdk, study_key)[source]

Return the first subject record form key for study_key.

Return type:

str

Parameters:
imednet.discovery.discover_interval_name(sdk, study_key)[source]

Return the first non-disabled interval name for study_key.

Return type:

str

Parameters:
imednet.discovery.discover_site_name(sdk, study_key)[source]

Return the first active site name for study_key.

Return type:

str

Parameters:
imednet.discovery.discover_study_key(sdk)[source]

Return the first study key available for the provided SDK.

Return type:

str

Parameters:

sdk (ImednetSDK) –

imednet.discovery.discover_subject_key(sdk, study_key)[source]

Return the first active subject key for study_key.

Return type:

str

Parameters: