> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/project.md).

# Project

class opalone.\_internal.projects.Project(project\_id, project\_type=None)

<table data-header-hidden><thead><tr><th width="158.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>A project is a resource which contains an arbitrary number of Models, Boards, ParameterSets, Connections and other types of resources.</td></tr><tr><td><strong>Parameters</strong></td><td><p><strong>project_id</strong> (<em>str</em>) – The ID of the project.</p><p><strong>project_type</strong> (<em>str</em>) – The type of the project. If omitted, the type will be fetched from the backend server when needed.</p></td></tr><tr><td><strong>Bases</strong></td><td>Ressource</td></tr></tbody></table>

## Methods

### add\_board

add\_board(*board\_type*, *name=None*, *description=None*, *parent=None*, *order=None*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add a Board to the project.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>board_type</strong> (<em>str | BoardType</em>) – The type of board to create.</li><li><strong>name</strong> (<em>str</em>) – The name of the new board. If not provided, a name will be generated.</li><li><strong>description</strong> (<em>str</em>) – An optional description of the new board.</li><li><strong>parent</strong> (<em>str | Group</em>) – The ID of the parent group board, if any, or a group object that shall be the parent.</li><li><strong>order</strong> (<em>int</em>) – The order of the board in its containing group. If not provided, the board is put at the end of the group’s array.</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The added board object.</td></tr><tr><td><strong>Return type</strong></td><td>Table | Panel | Scope | Group</td></tr></tbody></table>

### add\_connection

add\_connection(*source*, *destination*, *is\_enabled=True*, *force\_enable=False*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Add a single connection to the project.<br>When using the path (str) of a matrix datapoint for the source and/or destination, subscripts can be specified. For example, specifying the 3rd element of a vector datapoint by adding [2]:</p><pre class="language-python" data-overflow="wrap"><code class="lang-python">conn1 = project.add_connection('my_model/my_block/VectorSignal[2]', 'my_panel/my_display1/Data')
conn2 = project.add_connection('my_model/my_block/MatrixSignal[2]', 'my_panel/my_display2/Data')
conn3 = project.add_connection('my_model/my_block/MatrixSignal[1][2]', 'my_panel/my_display3/Data')
conn4 = project.add_connection('my_model/my_block/MatrixSignal[1, -2]', 'my_panel/my_display4/Data')
</code></pre></td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>source</strong> (<em>str | Datapoint</em>) – The source datapoint, either path (str), alias (str), or a datapoint object.</li><li><strong>destination</strong> (<em>str | Datapoint</em>) – The destination datapoint, either a path (str), alias (str), or a datapoint object.</li><li><strong>is_enabled</strong> (<em>bool</em>) – A flag to initially set the connection as <em>enabled</em> (True) or not (False). If the destination datapoint is already connected and that connection is enabled, adding this new connection will fail unless <em>force_enable</em> is <em>True</em> as well.</li><li><strong>force_enable</strong> (<em>bool</em>) – A flag to <em>overwrite</em> (True) or not (False) previous connections to the destination datapoint, if needed.</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The added connection object.</td></tr><tr><td><strong>Return type</strong></td><td>Connection</td></tr></tbody></table>

### add\_model

add\_model(*name=None*, *description=None*, *is\_grid\_visible=False*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add a new model to a project.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>name</strong> (<em>str</em>) – The name of the model to add. If not provided, a name will be generated.</li><li><strong>description</strong> (<em>str</em>) – An optional description of the model to add.</li><li><strong>is_grid_visible</strong> (<em>bool</em>) – A flag stating if the initial state of this model’s grid is <em>visible</em> (True) or not (False).</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The added model object.</td></tr><tr><td><strong>Return type</strong></td><td>Model</td></tr></tbody></table>

### add\_multiple\_connections

add\_multiple\_connections(*sources*, *destinations*, *is\_enabled=True*, *force\_enable=False*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add multiple connections to the project.<br>See the description of the <strong>add_connection</strong>() method for particularities of the path syntax.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>sources</strong> (<em>list[str | Datapoint]</em>) – The list of source datapoints, either paths (list[str]) or datapoint objects. path str and objects can be mixed as well.</li><li><strong>destinations</strong> (<em>list[str | Datapoint]</em>) – The list of destination datapoints, either paths (list of str) or datapoint objects. path str and objects can be mixed as well.</li><li><strong>is_enabled</strong> (<em>bool | list[bool]</em>) – A flag to initially set connections as <em>enabled</em> (True) or not (False). The flag can be a boolean, which will apply to all connections to create, or it can be a list of boolean values to set the state individually. For each new connection to create, If the destination datapoint is already connected and that connection is enabled, adding this new connection will fail unless <em>force_enable</em> is <em>True</em> as well. A failure for a single connection will cancel all other connections created in this function’s call.</li><li><strong>force_enable</strong> (<em>bool</em>) – A flag to <em>overwrite</em> (True) or not (False) previous connections to the destination datapoints, if needed.</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The added connection objects.</td></tr><tr><td><strong>Return type</strong></td><td>tuple[Connection]</td></tr><tr><td><strong>Raises</strong></td><td><ul><li><strong>ApiValueError</strong> – If the length of <em>sources</em> is not equal to the length of <em>destinations</em>.</li><li><strong>ApiValueError</strong> – If <em>is_enabled</em> is a list and its length is not equal to the length of <em>destinations</em>.</li></ul></td></tr></tbody></table>

### add\_parameter\_set

add\_parameter\_set(*name=None*, *description=None*, *control\_id=None*, *order=None*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add a custom parameter set to the project.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>name</strong> (<em>str</em>) – The name of the new parameter set. If not provided, a name will be generated.</li><li><strong>description</strong> (<em>str</em>) – An optional description of the new parameter set.</li><li><strong>control_id</strong> (<em>str</em>) – An optional control id of the new parameter set (not used for now).</li><li><strong>order</strong> (<em>int</em>) – The order of the new parameter set in the array of parameter sets. If not provided, the parameter set is put at the end of the parameter set array.</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The added parameter set object.</td></tr><tr><td><strong>Return type</strong></td><td>ParameterSet</td></tr></tbody></table>

### add\_script

add\_script(*name*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add a script to the Project.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>name</strong> (<em>str</em>) – Name of the script to add.</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### add\_script\_from\_file

add\_script\_from\_file(*source\_file\_path*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add a script to the Project from a python script file.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>source_file_path</strong> (<em>str</em>) – Path to the source file.</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### **delete**

delete()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Delete the current project.<br>All underlying resources will also be deleted.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### export

export()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Export the current project to a zip file stored on the user’s filesystem.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>NOT YET SUPPORTED</strong></p></div></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### pause\_all\_models

pause\_all\_models()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Attempt to pause all simulation models of a project.<br>If one or more models fail to pause, the rest of the models might not be treated. Some models might end up running while others are not.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### remove\_connections

remove\_connections(*connections*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Remove connections from the project.</td></tr><tr><td><strong>Parameters</strong></td><td><strong>connections</strong> (<em>list[str|Connection]</em>) – Connections to remove, either IDs or connection objects. IDs and objects can be mixed as well.</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### remove\_file

remove\_file(*file*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Remove a file from the Project.</td></tr><tr><td><strong>Parameters</strong></td><td><strong>file</strong> (<em>str | File</em>) – File to remove, either an ID or a file object.</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### remove\_script

remove\_script(*script*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Remove a script from the Project.</td></tr><tr><td><strong>Parameters</strong></td><td><strong>script</strong> (<em>str | Script</em>) – Script to remove, either an ID or a script object.</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### run\_all\_models

run\_all\_models()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Attempt to run all simulation models of a project.</p><p>If one or more models fail to run, the rest of the models might not be treated. Some models might end up running while others are not.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### stop\_all\_models

stop\_all\_models()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Attempt to stop all simulation models of a project.</p><p>If one or more models fail to stop, the rest of the models might not be treated. Some models might end up running while others are not.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### stop\_all\_scripts

stop\_all\_scripts()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Stops all running scripts in the Project.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### to\_json

to\_json(*fields*, *values*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Convert this resource to a serialized JSON representation.</td></tr><tr><td><strong>Parameters</strong></td><td><ul><li><strong>fields</strong> (<em>tuple[str] | list[str]</em>) – Fields to include.</li><li><strong>values</strong> (<em>tuple[object] | list[object]</em>) – The value of each field</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The serialized JSON representation.</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>

## Property

### aliases

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Get all aliases of the project.</p><p>This property fetches all the aliases associated with the project from the backend API.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>A dictionary with paths as keys and aliases as values.</td></tr><tr><td><strong>Return type</strong></td><td>dict</td></tr><tr><td><strong>Raises</strong></td><td><strong>ApiException</strong> – If there is an error fetching the aliases from the API.</td></tr></tbody></table>

### boards

*property* board&#x73;*: BoardLocator*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The Boards of the project handled by a board locator.</p><p>This property is read-only, it cannot be modified. However, attributes of boards in the board tree might be alterable.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>BoardLocator</td></tr></tbody></table>

### connections

*property* connection&#x73;*: tuple\[Connection]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>A listing of the connections in the project.</p><p>This property is read-only, it cannot be modified. However, each connection might have alterable properties.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>tuple[Connection]</td></tr></tbody></table>

### created\_at

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>The creation date of the project.<br>This property is read-only, it cannot be modified.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr></tbody></table>

### datapoints

*property* datapoint&#x73;*: dict\[str, Datapoint]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The datapoints of all resources in the project, in the form of a mapping <em>path = datapoint</em>.</p><p>Datapoints are a concatenation of parameters and signals, and could include other elements in the future.</p><p>This property is read-only, it cannot be modified. However, each datapoint might have alterable properties.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>dict[str, Datapoint]</td></tr></tbody></table>

### files

*property* file&#x73;*: dict\[str, File]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The list of files in the project, as a mapping <em>name = file</em>.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This property is currently limited since there is no uniqueness in file names within a project. Some files might not be accessible in this mapping.</p></div><p>This property is read-only, it cannot be modified. However, each file might have alterable properties.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>dict[str, File]</td></tr></tbody></table>

### id

*property* i&#x64;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The ID of the resource.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>

### model

*property* model&#x73;*: dict\[str, Model]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The list of models in the project, as a mapping <em>name = model</em>. The model names are unique within the project.</p><p>This property is read-only, it cannot be modified. However, each model might have alterable properties.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>dict[str, Model]</td></tr></tbody></table>

### modified\_at

*property* modified\_at

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The last-modified date of the project.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr></tbody></table>

### name

*property* nam&#x65;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>The name of the project.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>

### parameter\_sets

*property* parameter\_set&#x73;*: dict\[str, ParameterSet]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The list of parameter sets in the project, as a mapping <em>name = parameter set</em>.</p><p>This property is read-only, it cannot be modified. However, each model might have alterable properties.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>dict[str, ParameterSet]</td></tr></tbody></table>

### path

*property* path

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Location path on the disk if the project is synchronized with RT-LAB or HYPERSIM.<br>For STANDARD project type, this field is empty.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr></tbody></table>

### scripts

*property* script&#x73;*: dict\[str, Script]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The list of scripts in the project, as a mapping <em>name = script</em>.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This property is currently limited since there is no uniqueness in script names within a project. Some scripts might not be accessible in this mapping.</p></div><p>This property is read-only, it cannot be modified. However, each script might have alterable properties.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>dict[str, Script]</td></tr></tbody></table>

### type

*property* typ&#x65;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The type of the project.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>

### version

*property* versio&#x6E;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>The version of the project.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/project.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
