> 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/rt-lab/automation-api-and-scripting/python-dashboard-api/api-reference/opalone.api.md).

# opalone.api

The **Opalone.api** package contains the API functions and definitions.

{% hint style="danger" %}
Definitions from an ***\_internal*****&#x20;subpackage** is subject to change without notice. The user SHOULD NOT import directly from *\_internal* subpackages.
{% endhint %}

## Functions

### get\_current\_project

opalone.api.get\_current\_project()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Find the Project matching the OPALONE_CURRENT_PROJECT_ID set in environment variables.</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr><tr><td><strong>Return</strong></td><td>a Project instance.</td></tr><tr><td><strong>Return type</strong></td><td>Project</td></tr></tbody></table>

### get\_project\_by\_name

opalone.api.get\_project\_by\_name(*project\_name*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Find the Project matching the given name. The returned instance can then be used to do further operations.</p><p>For RT-LAB and HYPERSIM projects, we recommend using get_project_by_path instead to avoid project name unicity issues.</p></td></tr><tr><td><strong>Parameter</strong></td><td><strong>project_name</strong> (<em>str</em>) – The name of the project to look for.</td></tr><tr><td><strong>Return</strong></td><td>a Project instance.</td></tr><tr><td><strong>Return type</strong></td><td>Project</td></tr></tbody></table>

### get\_project\_by\_path

opalone.api.get\_project\_by\_path(project\_path)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Find the Project matching the given project_path.</p><p>The returned instance can then be used to do further operations.</p><p>The project_path must be the complete filesystem path to the HYPERSIM .ecf file, or the RT-LAB .llp file.</p><p>Make sure you call the use_rtlab() or use_hypersim() function, depending on your context, before using the current function.</p></td></tr><tr><td><strong>Parameter</strong></td><td><strong>project_path</strong> (<em>str</em>) – The path of the project to look for.</td></tr><tr><td><strong>Return</strong></td><td>a Project instance.</td></tr><tr><td><strong>Return type</strong></td><td>Project</td></tr></tbody></table>

### get\_widget\_library\_block

opalone.api.get\_widget\_library\_block(*path*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Get the LibraryBlock matching the given path. The returned instance can then be used to do further operations.</td></tr><tr><td><strong>Parameter</strong></td><td><strong>path</strong> (<em>str</em>) – The path of the widget to get. Generally this path is obtained by calling get_widget_library_paths()</td></tr><tr><td><strong>Return</strong></td><td>a LibraryBlock instance.</td></tr><tr><td><strong>Return type</strong></td><td>LibraryBlock</td></tr></tbody></table>

### get\_widget\_library\_paths

opalone.api.get\_widget\_library\_paths() → list\[str]

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>This function returns a list of widgets paths contained in the Widget Library that comes with <em>Dashboards</em>. This method is useful to browse for available widgets.</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr><tr><td><strong>Return</strong></td><td>a list of widget paths as strings.</td></tr><tr><td><strong>Return type</strong></td><td>list[str]</td></tr></tbody></table>

## Class

### BoardType

class opalone.api.BoardType(value)

<table><thead><tr><th width="200">Enumeration of Board Types</th><th>Description</th></tr></thead><tbody><tr><td><strong>GROUP </strong><em><strong>= 'GROUP'</strong></em></td><td>A group allows to group boards together. They appear graphically as folders in the left-side pane of the OPAL-RT Dashboards application. A group can contain an arbitrary number of other groups, which themselves can contain subgroups, etc.</td></tr><tr><td><strong>PANEL </strong><em><strong>= 'PANEL'</strong></em></td><td>A panel is a graphical canvas of <a href="https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/widget.md">Widgets</a>, that the user can arrange and customize.</td></tr><tr><td><strong>SCOPE </strong><em><strong>= 'SCOPE'</strong></em></td><td>A scope allows for the live visualization of <a href="https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/blocksignal.md">Signal</a> values.</td></tr><tr><td><strong>TABLE </strong><em><strong>= 'TABLE'</strong></em></td><td>A table is a custom list of data points of interest which belong to the same project.</td></tr></tbody></table>

### DataType

class opalone.api.DataType(value)

<table><thead><tr><th width="200">Enumeration of valid Data Types</th><th>Description</th></tr></thead><tbody><tr><td><strong>BOOLEAN </strong><em><strong>= 'BOOLEAN'</strong></em></td><td>A boolean with two possible states: 0 (false) or 1 (true).</td></tr><tr><td><strong>COLOR </strong><em><strong>= 'COLOR'</strong></em></td><td>A RBGA color code, which is a tuple of 4 integer values between 0 and 255.</td></tr><tr><td><strong>ENUM </strong><em><strong>= 'ENUM'</strong></em></td><td>A set of possible values, as listed in the library data of the Datapoint having the ENUM data type.</td></tr><tr><td><strong>FILE </strong><em><strong>= 'FILE'</strong></em></td><td>An association to a <a href="https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/file.md">File</a> object.</td></tr><tr><td><strong>INTEGER </strong><em><strong>= 'INTEGER'</strong></em></td><td>An integer value (i.e. no decimal digits).</td></tr><tr><td><strong>NUMERIC </strong><em><strong>= 'NUMERIC'</strong></em></td><td>Any of REAL, BOOLEAN or NUMERIC.</td></tr><tr><td><strong>OBJECT </strong><em><strong>= 'OBJECT'</strong></em></td><td>An object of any shape.</td></tr><tr><td><strong>REAL </strong><em><strong>= 'REAL'</strong></em></td><td>A real value, or float.</td></tr><tr><td><strong>SCRIPT </strong><em><strong>= 'SCRIPT'</strong></em></td><td>An association to a <a href="https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/script.md">Script</a> object.</td></tr><tr><td><strong>STRING </strong><em><strong>= 'STRING'</strong></em></td><td>A string of any length.</td></tr></tbody></table>

#### is\_numeric

*classmethod* is\_numeric(*value*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Checks if the given data type represents a numeric value (True) or not (False).</td></tr><tr><td><strong>Parameter</strong></td><td><strong>value</strong> (<em>str | DataType</em>) – The value to check.</td></tr><tr><td><strong>Return</strong></td><td>True means it is a numerical data type.</td></tr><tr><td><strong>Return type</strong></td><td>bool</td></tr></tbody></table>

#### is\_object

*classmethod* is\_object(*value*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Checks if the given data type represents any object type value (True) or not (False).</td></tr><tr><td><strong>Parameter</strong></td><td><strong>value</strong> (<em>str | DataType</em>) – The value to check.</td></tr><tr><td><strong>Return</strong></td><td>True means it is a object data type.</td></tr><tr><td><strong>Return type</strong></td><td>bool</td></tr></tbody></table>

#### is\_string

*classmethod* is\_string(*value*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Checks if the given data type represents any string type value (True) or not (False).</td></tr><tr><td><strong>Parameter</strong></td><td><strong>value</strong> (<em>str | DataType</em>) – The value to check.</td></tr><tr><td><strong>Return</strong></td><td>True means it is a string data type.</td></tr><tr><td><strong>Return type</strong></td><td>bool</td></tr></tbody></table>

#### is\_value

*classmethod* is\_value(*value*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Checks if the given data type represents any numeric-compatible value (True) or not (False).</p><p>A <em>numeric-compatible</em> data type includes all numerical data type plus other types that can be translated to numeric values, such as COLOR and ENUM.</p></td></tr><tr><td><strong>Parameter</strong></td><td><strong>value</strong> (<em>str | DataType</em>) – The value to check.</td></tr><tr><td><strong>Return</strong></td><td>True means it is a numeric-compatible data type.</td></tr><tr><td><strong>Return type</strong></td><td>bool</td></tr></tbody></table>

### DatapointType

*class* opalone.api.DatapointType(*value*)

<table><thead><tr><th width="200">Enumeration of valid datapoint types.</th><th>Description</th></tr></thead><tbody><tr><td><strong>COMMAND </strong><em><strong>= 'COMMAND'</strong></em></td><td>A command signal is a signal generated as output by a widget.</td></tr><tr><td><strong>DISPLAY </strong><em><strong>= 'DISPLAY'</strong></em></td><td>A display signal is a signal consumed as input by a widget.</td></tr><tr><td><strong>INPUT </strong><em><strong>= 'INPUT'</strong></em></td><td>An input signal is a signal consumed as input by a block.</td></tr><tr><td><strong>IO_INPUT </strong><em><strong>= 'IO_INPUT'</strong></em></td><td>An IO_INPUT is an input signal of an IO consumed as input by a block.</td></tr><tr><td><strong>IO_OUTPUT </strong><em><strong>= 'IO_OUTPUT'</strong></em></td><td>An IO_OUTPUT is an output signal of an IO generated as output by a block</td></tr><tr><td><strong>MULTI_DISPLAY </strong><em><strong>= 'MULTI_DISPLAY'</strong></em></td><td>A multi-display signal is a signal that can establish multiple connections with source signals in a simulation. The signal is consumed as input by a widget.</td></tr><tr><td><strong>OUTPUT </strong><em><strong>= 'OUTPUT'</strong></em></td><td>An output signal is a signal generated as output by a block.</td></tr><tr><td><strong>PARAMETER </strong><em><strong>= 'PARAMETER'</strong></em></td><td>A parameter is an internal, controllable property of a block or widget.</td></tr></tbody></table>

#### is\_signal

classmethod is\_signal(value)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Checks if the given datapoint type is a signal (True) or not (False).</td></tr><tr><td><strong>Parameter</strong></td><td><strong>value</strong> (<em>str | DataType</em>) – The value to check.</td></tr><tr><td><strong>Return</strong></td><td>True means it is a signal, False otherwise.</td></tr><tr><td><strong>Return type</strong></td><td>bool</td></tr></tbody></table>

### ScriptState

class opalone.api.ScriptState(value)

<table><thead><tr><th width="200">Enumeration for types of Scripts.</th><th>Description</th></tr></thead><tbody><tr><td><strong>ABORTED </strong><em><strong>= 'ABORTED'</strong></em></td><td>The script has run but was interupted by user action.</td></tr><tr><td><strong>FAILED </strong><em><strong>= 'FAILED'</strong></em></td><td>The script has run but exited with an error.</td></tr><tr><td><strong>NONE </strong><em><strong>= 'NONE'</strong></em></td><td>The script has never run before.</td></tr><tr><td><strong>RUNNING </strong><em><strong>= 'RUNNING'</strong></em></td><td>The script is currently running.</td></tr><tr><td><strong>SUCCESS </strong><em><strong>= 'SUCCESS'</strong></em></td><td>The script has run and successfully exited.</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/rt-lab/automation-api-and-scripting/python-dashboard-api/api-reference/opalone.api.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.
