Skip to main content

Designs

MethodDescription
list_simple_output_setsList simple output sets.
iter_simple_output_setsIterate over simple output sets.
get_simple_output_setGet a simple output set by SID.
create_simple_output_set_from_jsonCreate a simple output set from a raw JSON payload.
create_simple_output_setCreate a simple output set from one or more measures on a model.
list_protocol_designsList protocol designs.
iter_protocol_designsIterate over protocol designs.
get_protocol_designGet a protocol design by SID.
create_protocol_design_from_jsonCreate a protocol design from a raw JSON payload.
create_protocol_designCreate a protocol design, optionally bound to a model.
create_protocol_design_from_csvCreate a protocol design from CSV-defined scenario arms.
list_advanced_output_setsList advanced output sets.
iter_advanced_output_setsIterate over advanced output sets.
get_advanced_output_setGet a advanced output set by SID.
create_advanced_output_set_from_jsonCreate an advanced output set from a raw JSON payload.
create_advanced_output_setCreate an advanced output set from constraint, scalar, and objective entries.
validate_scoring_conditionValidate a scoring condition used in constraints or objective filters.
validate_scoring_formulaValidate a scoring formula string.
list_extractsList extracts.
iter_extractsIterate over extracts.
get_extractGet a extract by SID.
list_subsampling_designsList subsampling designs.
iter_subsampling_designsIterate over subsampling designs.
get_subsampling_designGet a subsampling design by SID.
create_trial_visualization_from_jsonCreate a trial visualization from a JSON payload or file.
list_trial_visualizationsList trial visualizations.
iter_trial_visualizationsIterate over trial visualizations.
get_trial_visualizationGet 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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
limitint | NoneMaximum number of results to return.None
deletedboolWhether to include deleted simple output sets.False
afterstr | NonePagination cursor.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
deletedboolWhether to include deleted simple output sets.False

Yields:

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:

NameTypeDescriptionDefault
sidstrThe SID of the simple output set.
revisionint | NoneOptional revision number.None
allow_deletedboolWhether to allow retrieving deleted simple output sets.False

Returns:

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:

NameTypeDescriptionDefault
json_contentdict[str, Any] | bytes | str | NoneThe simple output set payload as a dict, JSON bytes, or JSON string.None
json_file_pathstr | Path | NonePath to a JSON file containing the payload.None
namestr | NoneOptional name for the new project item.None
folderFolder | str | NoneOptional destination folder.None
descriptionstr | NoneOptional description for the new project item.None
versionstr | dict | NoneOptional version name str. Can also be a dict with the keys name and description to set a version description.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
limitint | NoneMaximum number of results to return.None
deletedboolWhether to include deleted protocol designs.False
afterstr | NonePagination cursor.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
deletedboolWhether to include deleted protocol designs.False

Yields:

get_protocol_design​

get_protocol_design(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> ProtocolDesign

Get a protocol design by SID.

Parameters:

NameTypeDescriptionDefault
sidstrThe SID of the protocol design.
revisionint | NoneOptional revision number.None
allow_deletedboolWhether to allow retrieving deleted protocol designs.False

Returns:

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:

NameTypeDescriptionDefault
json_contentdict[str, Any] | bytes | str | NoneThe protocol design payload as a dict, JSON bytes, or JSON string.None
json_file_pathstr | Path | NonePath to a JSON file containing the payload.None
namestr | NoneOptional name for the new project item.None
folderFolder | str | NoneOptional destination folder.None
descriptionstr | NoneOptional description for the new project item.None
versionstr | dict | NoneOptional version name str. Can also be a dict with the keys name and description to set a version description.None

Returns:

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. key must 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 to None for the reference arm.
  • armIsActive: boolean, defaults to True when omitted.
  • armWeight: numeric weight, defaults to 1 when 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:

NameTypeDescriptionDefault
csv_contentstr | bytes | NoneThe CSV data as a string or bytes.None
csv_file_pathstr | Path | NonePath to a CSV file.None
folderFolder | str | NoneOptional destination folder.None
namestr | NoneOptional name for the new project item.None
descriptionstr | NoneOptional description for the new project item.None
versionstr | dict | NoneOptional version name str. Can also be a dict with the keys name and description to set a version description.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
limitint | NoneMaximum number of results to return.None
deletedboolWhether to include deleted advanced output sets.False
afterstr | NonePagination cursor.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
deletedboolWhether to include deleted advanced output sets.False

Yields:

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:

NameTypeDescriptionDefault
sidstrThe SID of the advanced output set.
revisionint | NoneOptional revision number.None
allow_deletedboolWhether to allow retrieving deleted advanced output sets.False

Returns:

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:

NameTypeDescriptionDefault
json_contentdict[str, Any] | bytes | str | NoneThe advanced output set payload as a dict, JSON bytes, or JSON string.None
json_file_pathstr | Path | NonePath to a JSON file containing the payload.None
namestr | NoneOptional name for the new project item.None
folderFolder | str | NoneOptional destination folder.None
descriptionstr | NoneOptional description for the new project item.None
versionstr | dict | NoneOptional version name str. Can also be a dict with the keys name and description to set a version description.None

Returns:

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, optional filter
  • scalars: id, formula, optional unit (Jinko will attempt to infer the unit)
  • objectives: id, formula, weight, optional filter

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
limitint | NoneMaximum number of results to return.None
deletedboolWhether to include deleted extracts.False
afterstr | NonePagination 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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
deletedboolWhether to include deleted extracts.False

Yields:

get_extract​

get_extract(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> Extract

Get a extract by SID.

Parameters:

NameTypeDescriptionDefault
sidstrThe SID of the extract.
revisionint | NoneOptional revision number.None
allow_deletedboolWhether to allow retrieving deleted extracts.False

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
limitint | NoneMaximum number of results to return.None
deletedboolWhether to include deleted subsampling designs.False
afterstr | NonePagination cursor.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
deletedboolWhether to include deleted subsampling designs.False

Yields:

get_subsampling_design​

get_subsampling_design(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> SubsamplingDesign

Get a subsampling design by SID.

Parameters:

NameTypeDescriptionDefault
sidstrThe SID of the subsampling design.
revisionint | NoneOptional revision number.None
allow_deletedboolWhether to allow retrieving deleted subsampling designs.False

Returns:

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:

NameTypeDescriptionDefault
datadict[str, Any] | str | PathA trial visualization payload dictionary or a path to a JSON file containing that payload.
namestr | NoneOptional name for the new project item.None
folderFolder | str | NoneOptional destination folder.None
descriptionstr | NoneOptional description for the new project item.None
versionstr | dict | NoneOptional version name str. Can also be a dict with the keys name and description to set a version description.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
limitint | NoneMaximum number of results to return.None
deletedboolWhether to include deleted trial visualizations.False
afterstr | NonePagination cursor.None

Returns:

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:

NameTypeDescriptionDefault
namestr | NoneOptional name filter.None
folderFolder | str | NoneOptional folder filter.None
deletedboolWhether to include deleted trial visualizations.False

Yields:

get_trial_visualization​

get_trial_visualization(
sid: str, *, revision: int | None = None, allow_deleted: bool = False
) -> TrialVisualization

Get a trial visualization by SID.

Parameters:

NameTypeDescriptionDefault
sidstrThe SID of the trial visualization.
revisionint | NoneOptional revision number.None
allow_deletedboolWhether to allow retrieving deleted trial visualizations.False

Returns: