Designs
| Method | Description |
|---|---|
list_simple_output_sets | List simple output sets. |
iter_simple_output_sets | Iterate over simple output sets. |
get_simple_output_set | Get a simple output set by SID. |
create_simple_output_set_from_json | Create a simple output set from a raw JSON payload. |
create_simple_output_set | Create a simple output set from one or more measures on a model. |
list_protocol_designs | List protocol designs. |
iter_protocol_designs | Iterate over protocol designs. |
get_protocol_design | Get a protocol design by SID. |
create_protocol_design_from_json | Create a protocol design from a raw JSON payload. |
create_protocol_design | Create a protocol design, optionally bound to a model. |
create_protocol_design_from_csv | Create a protocol design from CSV-defined scenario arms. |
list_advanced_output_sets | List advanced output sets. |
iter_advanced_output_sets | Iterate over advanced output sets. |
get_advanced_output_set | Get a advanced output set by SID. |
create_advanced_output_set_from_json | Create an advanced output set from a raw JSON payload. |
create_advanced_output_set | Create an advanced output set from constraint, scalar, and objective entries. |
validate_scoring_condition | Validate a scoring condition used in constraints or objective filters. |
validate_scoring_formula | Validate a scoring formula string. |
list_extracts | List extracts. |
iter_extracts | Iterate over extracts. |
get_extract | Get a extract by SID. |
list_subsampling_designs | List subsampling designs. |
iter_subsampling_designs | Iterate over subsampling designs. |
get_subsampling_design | Get a subsampling design by SID. |
create_trial_visualization_from_json | Create a trial visualization from a JSON payload or file. |
list_trial_visualizations | List trial visualizations. |
iter_trial_visualizations | Iterate over trial visualizations. |
get_trial_visualization | Get a trial visualization by SID. |
list_simple_output_sets
list_simple_output_sets(
*,
name: str | None = None,
folder: Folder | str | None = None,
limit: int | None = None,
deleted: bool = False,
after: str | None = None
) -> Page["SimpleOutputSet"]
List simple output sets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
limit | int | None | Maximum number of results to return. | None |
deleted | bool | Whether to include deleted simple output sets. | False |
after | str | None | Pagination cursor. | None |
Returns:
Page['SimpleOutputSet']: A page of SimpleOutputSet objects.
iter_simple_output_sets
iter_simple_output_sets(
*,
name: str | None = None,
folder: Folder | str | None = None,
deleted: bool = False
) -> Iterator["SimpleOutputSet"]
Iterate over simple output sets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
deleted | bool | Whether to include deleted simple output sets. | False |
Yields:
SimpleOutputSet: SimpleOutputSet objects.
get_simple_output_set
get_simple_output_set(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> SimpleOutputSet
Get a simple output set by SID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sid | str | The SID of the simple output set. | |
revision | int | None | Optional revision number. | None |
allow_deleted | bool | Whether to allow retrieving deleted simple output sets. | False |
Returns:
SimpleOutputSet: The requested SimpleOutputSet.
create_simple_output_set_from_json
create_simple_output_set_from_json(
*,
json_content: dict[str, Any] | bytes | str | None = None,
json_file_path: str | Path | None = None,
name: str | None = None,
folder: Folder | str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> SimpleOutputSet
Create a simple output set from a raw JSON payload.
Exactly one of json_content or json_file_path must be provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_content | dict[str, Any] | bytes | str | None | The simple output set payload as a dict, JSON bytes, or JSON string. | None |
json_file_path | str | Path | None | Path to a JSON file containing the payload. | None |
name | str | None | Optional name for the new project item. | None |
folder | Folder | str | None | Optional destination folder. | None |
description | str | None | Optional description for the new project item. | None |
version | str | dict | None | Optional version name str. Can also be a dict with the keys name and description to set a version description. | None |
Returns:
SimpleOutputSet: The created SimpleOutputSet.
create_simple_output_set
create_simple_output_set(
model: Model,
measures: list[str | dict[str, Any]],
*,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> SimpleOutputSet
Create a simple output set from one or more measures on a model.
Each entry in measures describes one scalar measure derived from a
model output. You may pass a hybrid list of strings and dictionaries.
String entries are shorthand output ids:
"Drug"becomes{"timeseriesId": "Drug"}
Dictionary entries support these keys:
timeseriesId(required): model output id to measure.name: custom measure name.origin:"OnEachArm","DifferenceVsControl", or"RatioVsControl".function: how the measure is computed.
function can be one of these point-in-time forms:
{"PointAtTime": "TStart"}{"PointAtTime": "TEnd"}{"PointAtTime": {"At": "PT4H"}}
Or one of these across-time forms. ObservationWindow is required by
the API whenever you use AcrossTime:
{"AcrossTime": {"CrossTimeMeasure": "Min", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "Max", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "TimeOfMax", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "TimeOfMin", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "Avg", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "Auc", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "MaxSlope", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "MinSlope", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "Amplitude", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "EndMinusStart", "ObservationWindow": "FromStartUntilEnd"}}{"AcrossTime": {"CrossTimeMeasure": "HalfLife", "ObservationWindow": "FromStartUntilEnd"}}
ObservationWindow accepts one of these forms:
{"ObservationWindow": "FromStartUntilEnd"}{"ObservationWindow": {"FromTimeUntilEnd": "PT2H"}}{"ObservationWindow": {"FromStartUntilTime": "PT8H"}}{"ObservationWindow": {"FromTimeUntilTime": {"TStart": "PT2H", "TEnd": "PT8H"}}}
The same output id may appear multiple times when you want several different measures from it.
Example:
client.create_simple_output_set(
model,
[
"Drug",
{"timeseriesId": "Drug", "name": "Drug_end"},
{
"timeseriesId": "Drug",
"function": {
"AcrossTime": {
"CrossTimeMeasure": "Auc",
"ObservationWindow": "FromStartUntilEnd",
}
},
"name": "Drug_auc",
},
{
"timeseriesId": "Drug",
"function": {"PointAtTime": {"At": "PT4H"}},
"name": "Drug_4h",
},
],
name="PK outputs",
description="Common PK readouts",
folder=workspace,
version="initial",
)
Only the fields you provide are used. Unspecified measure options are left unset.
Can also be accessed through Model.create_simple_output_set().
list_protocol_designs
list_protocol_designs(
*,
name: str | None = None,
folder: Folder | str | None = None,
limit: int | None = None,
deleted: bool = False,
after: str | None = None
) -> Page["ProtocolDesign"]
List protocol designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
limit | int | None | Maximum number of results to return. | None |
deleted | bool | Whether to include deleted protocol designs. | False |
after | str | None | Pagination cursor. | None |
Returns:
Page['ProtocolDesign']: A page of ProtocolDesign objects.
iter_protocol_designs
iter_protocol_designs(
*,
name: str | None = None,
folder: Folder | str | None = None,
deleted: bool = False
) -> Iterator["ProtocolDesign"]
Iterate over protocol designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
deleted | bool | Whether to include deleted protocol designs. | False |
Yields:
ProtocolDesign: ProtocolDesign objects.
get_protocol_design
get_protocol_design(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> ProtocolDesign
Get a protocol design by SID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sid | str | The SID of the protocol design. | |
revision | int | None | Optional revision number. | None |
allow_deleted | bool | Whether to allow retrieving deleted protocol designs. | False |
Returns:
ProtocolDesign: The requested ProtocolDesign.
create_protocol_design_from_json
create_protocol_design_from_json(
*,
json_content: dict[str, Any] | bytes | str | None = None,
json_file_path: str | Path | None = None,
name: str | None = None,
folder: Folder | str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> ProtocolDesign
Create a protocol design from a raw JSON payload.
Exactly one of json_content or json_file_path must be provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_content | dict[str, Any] | bytes | str | None | The protocol design payload as a dict, JSON bytes, or JSON string. | None |
json_file_path | str | Path | None | Path to a JSON file containing the payload. | None |
name | str | None | Optional name for the new project item. | None |
folder | Folder | str | None | Optional destination folder. | None |
description | str | None | Optional description for the new project item. | None |
version | str | dict | None | Optional version name str. Can also be a dict with the keys name and description to set a version description. | None |
Returns:
ProtocolDesign: The created ProtocolDesign.
create_protocol_design
create_protocol_design(
arms: list[dict],
*,
model: Model | None = None,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> ProtocolDesign
Create a protocol design, optionally bound to a model.
When model is provided, this can also be accessed through
Model.create_protocol_design() for convenience. Prefer passing
model whenever one is available so the protocol design carries a
snapshot reference and override keys can be validated by the platform.
arms is a list of arm dicts. Each arm dict supports the following
keys:
armName(required): unique arm identifier string.armOverrides(required): list of{"key": "<component-id>", "formula": "<value>"}entries.keymust target a model input that is runnable by the protocol (e.g."Dose","route").armControl: name of another arm that this arm is compared against. Omit or set toNonefor the reference arm.armIsActive: boolean, defaults toTruewhen omitted.armWeight: numeric weight, defaults to1when omitted.
Example – minimal two-arm protocol::
protocol = client.create_protocol_design(
[
{
"armName": "control",
"armOverrides": [{"key": "Dose", "formula": "1.0"}],
},
{
"armName": "treated",
"armControl": "control",
"armOverrides": [{"key": "Dose", "formula": "2.0"}],
},
],
model=model,
name="My protocol",
)
The raw-dict interface is intentional for the initial creation batch.
Once the ProtocolDesign is created, its arms property exposes a
more ergonomic object-oriented interface for iterating and refining
arms::
# Append a third arm without touching the others
protocol.arms.create(
"high_dose",
control="control",
overrides={"Dose": "4.0"},
)
# Adjust an existing arm in place
arm = protocol.arms.get("treated")
arm.set_override("Dose", "3.0")
See ProtocolDesign.arms and ProtocolArmsService for the full
post-creation editing API.
create_protocol_design_from_csv
create_protocol_design_from_csv(
*,
csv_content: str | bytes | None = None,
csv_file_path: str | Path | None = None,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> ProtocolDesign
Create a protocol design from CSV-defined scenario arms.
Exactly one of csv_content or csv_file_path must be provided.
Each row represents one scenario arm. The arm column is required.
control, active, and weight are arm metadata; every other
column is an arm override.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
csv_content | str | bytes | None | The CSV data as a string or bytes. | None |
csv_file_path | str | Path | None | Path to a CSV file. | None |
folder | Folder | str | None | Optional destination folder. | None |
name | str | None | Optional name for the new project item. | None |
description | str | None | Optional description for the new project item. | None |
version | str | dict | None | Optional version name str. Can also be a dict with the keys name and description to set a version description. | None |
Returns:
ProtocolDesign: The created ProtocolDesign.
list_advanced_output_sets
list_advanced_output_sets(
*,
name: str | None = None,
folder: Folder | str | None = None,
limit: int | None = None,
deleted: bool = False,
after: str | None = None
) -> Page["AdvancedOutputSet"]
List advanced output sets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
limit | int | None | Maximum number of results to return. | None |
deleted | bool | Whether to include deleted advanced output sets. | False |
after | str | None | Pagination cursor. | None |
Returns:
Page['AdvancedOutputSet']: A page of AdvancedOutputSet objects.
iter_advanced_output_sets
iter_advanced_output_sets(
*,
name: str | None = None,
folder: Folder | str | None = None,
deleted: bool = False
) -> Iterator[AdvancedOutputSet]
Iterate over advanced output sets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
deleted | bool | Whether to include deleted advanced output sets. | False |
Yields:
AdvancedOutputSet: AdvancedOutputSet objects.
get_advanced_output_set
get_advanced_output_set(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> AdvancedOutputSet
Get a advanced output set by SID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sid | str | The SID of the advanced output set. | |
revision | int | None | Optional revision number. | None |
allow_deleted | bool | Whether to allow retrieving deleted advanced output sets. | False |
Returns:
AdvancedOutputSet: The requested AdvancedOutputSet.
create_advanced_output_set_from_json
create_advanced_output_set_from_json(
*,
json_content: dict[str, Any] | bytes | str | None = None,
json_file_path: str | Path | None = None,
name: str | None = None,
folder: Folder | str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> AdvancedOutputSet
Create an advanced output set from a raw JSON payload.
Exactly one of json_content or json_file_path must be provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_content | dict[str, Any] | bytes | str | None | The advanced output set payload as a dict, JSON bytes, or JSON string. | None |
json_file_path | str | Path | None | Path to a JSON file containing the payload. | None |
name | str | None | Optional name for the new project item. | None |
folder | Folder | str | None | Optional destination folder. | None |
description | str | None | Optional description for the new project item. | None |
version | str | dict | None | Optional version name str. Can also be a dict with the keys name and description to set a version description. | None |
Returns:
AdvancedOutputSet: The created AdvancedOutputSet.
create_advanced_output_set
create_advanced_output_set(
*,
constraints: list[dict[str, Any]] | None = None,
scalars: list[dict[str, Any]] | None = None,
objectives: list[dict[str, Any]] | None = None,
show_validation: bool | None = None,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> AdvancedOutputSet
Create an advanced output set from constraint, scalar, and objective entries.
Each entry is passed as a plain dict with the fields you want to set.
Expected fields are (strings or floats):
- constraints:
id,constraint, optionalfilter - scalars:
id,formula, optionalunit(Jinko will attempt to infer the unit) - objectives:
id,formula,weight, optionalfilter
Each entry may also include optional metadata fields such as
display_name, description, and is_active.
Constraint expressions, scalar formulas, objective filters, and objective formula targets are validated before the advanced output set is created.
When show_validation is None, validation results are displayed
automatically in notebook environments only. Pass True to request
that display behavior explicitly, or False to suppress it.
Only pass the sections you want to define. Omitted sections default to empty lists.
validate_scoring_condition
validate_scoring_condition(
condition: str,
) -> ExpressionValidationResult
Validate a scoring condition used in constraints or objective filters.
The returned object exposes is_valid and validation. In notebook
environments, a valid result also renders its LaTeX representation.
validate_scoring_formula
validate_scoring_formula(formula: str) -> ExpressionValidationResult
Validate a scoring formula string.
The returned object exposes is_valid and validation. In notebook
environments, a valid result also renders its LaTeX representation.
list_extracts
list_extracts(
*,
name: str | None = None,
folder: Folder | str | None = None,
limit: int | None = None,
deleted: bool = False,
after: str | None = None
) -> Page["Extract"]
List extracts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
limit | int | None | Maximum number of results to return. | None |
deleted | bool | Whether to include deleted extracts. | False |
after | str | None | Pagination cursor. | None |
Returns:
Page['Extract']: A page of Extract objects.
iter_extracts
iter_extracts(
*,
name: str | None = None,
folder: Folder | str | None = None,
deleted: bool = False
) -> Iterator[Extract]
Iterate over extracts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
deleted | bool | Whether to include deleted extracts. | False |
Yields:
Extract: Extract objects.
get_extract
get_extract(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> Extract
Get a extract by SID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sid | str | The SID of the extract. | |
revision | int | None | Optional revision number. | None |
allow_deleted | bool | Whether to allow retrieving deleted extracts. | False |
Returns:
Extract: The requested Extract.
list_subsampling_designs
list_subsampling_designs(
*,
name: str | None = None,
folder: Folder | str | None = None,
limit: int | None = None,
deleted: bool = False,
after: str | None = None
) -> Page["SubsamplingDesign"]
List subsampling designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
limit | int | None | Maximum number of results to return. | None |
deleted | bool | Whether to include deleted subsampling designs. | False |
after | str | None | Pagination cursor. | None |
Returns:
Page['SubsamplingDesign']: A page of SubsamplingDesign objects.
iter_subsampling_designs
iter_subsampling_designs(
*,
name: str | None = None,
folder: Folder | str | None = None,
deleted: bool = False
) -> Iterator["SubsamplingDesign"]
Iterate over subsampling designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
deleted | bool | Whether to include deleted subsampling designs. | False |
Yields:
SubsamplingDesign: SubsamplingDesign objects.
get_subsampling_design
get_subsampling_design(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> SubsamplingDesign
Get a subsampling design by SID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sid | str | The SID of the subsampling design. | |
revision | int | None | Optional revision number. | None |
allow_deleted | bool | Whether to allow retrieving deleted subsampling designs. | False |
Returns:
SubsamplingDesign: The requested SubsamplingDesign.
create_trial_visualization_from_json
create_trial_visualization_from_json(
data: dict[str, Any] | str | Path,
*,
name: str | None = None,
folder: Folder | str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> TrialVisualization
Create a trial visualization from a JSON payload or file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data | dict[str, Any] | str | Path | A trial visualization payload dictionary or a path to a JSON file containing that payload. | |
name | str | None | Optional name for the new project item. | None |
folder | Folder | str | None | Optional destination folder. | None |
description | str | None | Optional description for the new project item. | None |
version | str | dict | None | Optional version name str. Can also be a dict with the keys name and description to set a version description. | None |
Returns:
TrialVisualization: The created TrialVisualization.
list_trial_visualizations
list_trial_visualizations(
*,
name: str | None = None,
folder: Folder | str | None = None,
limit: int | None = None,
deleted: bool = False,
after: str | None = None
) -> Page["TrialVisualization"]
List trial visualizations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
limit | int | None | Maximum number of results to return. | None |
deleted | bool | Whether to include deleted trial visualizations. | False |
after | str | None | Pagination cursor. | None |
Returns:
Page['TrialVisualization']: A page of TrialVisualization objects.
iter_trial_visualizations
iter_trial_visualizations(
*,
name: str | None = None,
folder: Folder | str | None = None,
deleted: bool = False
) -> Iterator["TrialVisualization"]
Iterate over trial visualizations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | None | Optional name filter. | None |
folder | Folder | str | None | Optional folder filter. | None |
deleted | bool | Whether to include deleted trial visualizations. | False |
Yields:
TrialVisualization: TrialVisualization objects.
get_trial_visualization
get_trial_visualization(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> TrialVisualization
Get a trial visualization by SID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sid | str | The SID of the trial visualization. | |
revision | int | None | Optional revision number. | None |
allow_deleted | bool | Whether to allow retrieving deleted trial visualizations. | False |
Returns:
TrialVisualization: The requested TrialVisualization.