Code reference

ctpy.connect(server: str, username: str, password: str, rate_limit: int | None = None) CTPYclient

Createa a connection to a CTP server

Parameters:
  • server – uri of the server to connect to (including http:// or https://),

  • username – username to login as

  • password – password for user

  • rate_limit – optionally limit the time between requests, this is specified as the maximum requests per second

Returns:

CTP client object

class ctpy.client.CTPYclient(server: str, username: str, password: str, rate_limit: int | None = None)

Bases: object

add_to_lookup(stage_id, key, value)
find_object_tracker_stages(pipeline)
format_uri(path: str, query: str | None = None) str
get(path: str, query: str | None = None, timeout: float | None = None, headers: Dict[str, str] = None) Response

Process a REST GET to the server

Parameters:
  • path – path for the request

  • query – query string to use for the request

  • timeout – timeout

  • headers – request headers

Returns:

requests response

get_ctp_step(pipeline: int, step: int) Dict[str, Dict[str, str]]
get_ctp_summary() List[CtpSummary]
get_object_tracker_patient_info(pipeline_id, stage_id, key='', patient_id=None, study_uid_filter=None)
get_users()
idmap_reverse_search_patientid(pipeline_id, stage_id, key)
idmap_reverse_search_uid(pipeline_id, stage_id, key)
idmap_search_patientid(pipeline_id, stage_id, key)
idmap_search_uid(pipeline_id, stage_id, key)
post(path: str, data, query: str | None = None, timeout: float | None = None, headers: Dict[str, str] = None) Response
put(path: str, query: str | None = None, timeout: float | None = None, headers: Dict[str, str] = None) Response
update_password(users)