proknow.ProKnow
ProKnow
- class proknow.ProKnow.ProKnow(base_url, credentials_file=None, credentials_id=None, credentials_secret=None, LOCK_RENEWAL_BUFFER=30, ENTITY_WAIT_TIMEOUT=10, MAX_RETRIES=3)
This is the main class that should be instatiated at the beginning of your Python program with your base URL (which should include your account subdomain) and your API token credentials.
- requestor
An instance of the Requestor class.
- session
An instance of the Session class.
- Type:
- custom_metrics
An instance of the CustomMetrics class.
- Type:
ProKnow.CustomMetrics.CustomMetrics
- scorecard_templates
An instance of the ScorecardTemplates class.
- Type:
ProKnow.ScorecardTemplates.ScorecardTemplates
- workspaces
An instance of the Workspaces class.
- roles
An instance of the Roles class.
- Type:
- users
An instance of the Users class.
- Type:
- uploads
An instance of the Uploads class.
- Type:
- patients
An instance of the Patients class.
- collections
An instance of the Collections class.
- LOCK_RENEWAL_BUFFER
The number of seconds to use as a buffer when renewing a lock for a draft structure set.
- Type:
int
- ENTITY_WAIT_TIMEOUT
The number of seconds to wait for plan delivery information and dose analysis data to be ready.
- Type:
int
- MAX_RETRIES
The number of retries to use for failed connection attempts.
- Type:
int
- __init__(base_url, credentials_file=None, credentials_id=None, credentials_secret=None, LOCK_RENEWAL_BUFFER=30, ENTITY_WAIT_TIMEOUT=10, MAX_RETRIES=3)
Initializes the ProKnow class.
The base_url must be provided as should either the credentials_file or both the credentials_id and credentials_secret.
- Parameters:
base_url (str) – The base URL to use when making request to the ProKnow API.
credentials_file (str) – The path to the credentials file obtained by creating an API key in your ProKnow account. The file should be a JSON file containing an object with the fields id and secret.
credentials_id (str) – An API key id.
credentials_secret (str) – An API key secret.
LOCK_RENEWAL_BUFFER (int, optional) – The number of seconds to use as a buffer when renewing a lock for a draft structure set. As an example, the default value of 30 means that the renewer will attempt to renew the lock 30 seconds before it actually expires.
ENTITY_WAIT_TIMEOUT (int, optional) – The number of seconds to wait for plan delivery information and dose analysis data to be ready.
MAX_RETRIES (int, optional) – The number of retries to use for failed connection attempts. The default is 3 retries.
- Raises:
AssertionError – If the input parameters are invalid.