context
The fixed identity and services a pod shares with its collaborators.
Classes
PodContext
class PodContext( name: str, pod_identifier: str, private_key: RSAPrivateKey, pod_key_path: Path, hub: BitfountHub, session: BitfountSession, secrets: APIKeys | RefreshableJWT | dict[SecretsUse, APIKeys | RefreshableJWT] | None, ehr_config: EHRConfig | None, datasource_manager: DatasourceManager, hub_trigger_verifier: HubTriggerVerifier,):What a pod is, as its collaborators need to know it.
Every field is fixed once the pod has finished construction. The pod name
is final after identifier-length enforcement, and nothing reassigns the
hub, session, secrets, keys or EHR configuration afterwards.
datasource_manager is a live object, so the datasource views below
reflect a config reload.
Arguments
name: The pod's name, after identifier-length enforcement.pod_identifier:<username>/<name>.private_key: The pod's RSA private key.pod_key_path: Path to the pod's RSA private key file.hub: The Hub the pod is registered with.session: The pod's authenticated Hub session.secrets: The secrets the pod was started with.ehr_config: The pod's EHR configuration, if any.datasource_manager: Owns the pod's datasources.hub_trigger_verifier: Authenticates Hub-originated triggers.
Variables
base_datasources : dict[str, DatasourceContainer]- The pod's servable datasources, by name.
-
configured_datasource_names : set[str]- Every datasource name the pod's config currently carries.Wider than
base_datasources, which holds only the servable ones: a datasource whose hub registration failed, or that could not be loaded, is dropped from there but is still in the config.
-
datasource_manager : DatasourceManager
datasources : dict[str, DatasourceContainer]- A copy of the pod's servable datasources, by name.
-
ehr_config : EHRConfig | None
-
hub : BitfountHub
-
hub_trigger_verifier : HubTriggerVerifier
-
name : str
-
pod_identifier : str
-
pod_key_path : Path
-
private_key : RSAPrivateKey
-
secrets : APIKeys | RefreshableJWT | dict[SecretsUse, APIKeys | RefreshableJWT] | None
-
session : BitfountSession