Study
Usage instructions for the Client SDK for Study
Quickstart
To write a report for a study with accession number $ACCESSION_NUMBER
with username $USERNAME
and private key filename $PRIVATE_KEY_FILENAME
, run:
StudyAPIClient
Reference
StudyAPIClient
ReferenceConstructor
Method signature
Parameters
username
(str
): The username to authenticate the client.private_key_filename
(Optional[str]
): Filename of the RSA private key.private_key_string
(Optional[str]
): The RSA private key as a string.base_url
(str
, has a default): The base URL of the Inference API. Defaults to 'https://api.bunkerhillhealth.com/'.
Notes
At least one of
private_key_filename
orprivate_key_string
must be provided.
set_report
set_report
Sets a report for a Study
object with a given accession number from the Study API. Must be called from an async context.
Hint: The set_report
method is asynchronous. To make use of this method from a synchronous application, calls to the StudyAPIClient
can be wrapped in asyncio.run()
.
Method signature
Parameters
accession_number
(str
): The accession number of the study.report
(str
): The text of the report.
Returns
None
Notes
You must have authorization to the specified
accession_number
. If not, a403
error will be raised.Only studies corresponding to institutions that you are authorized to will be writable.
Last updated