Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Get Python Object

`UiPath.Python.Activities.GetObject<T>`

Gets a .NET value from a Python object reference.

**Package:** `UiPath.Python.Activities`
**Category:** App Invoker.Python

## Properties

### Input

| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
|------|-------------|------|------|----------|---------|-------------|-------------|
| `PythonObject` | Python object | InArgument | `PythonObject` | Yes | | | Python object to convert to a .NET value. |

### Configuration

| Name | Display Name | Type | Default | Description |
|------|-------------|------|---------|-------------|
| - | - | - | - | - |

### Output

| Name | Display Name | Kind | Type | Description |
|------|-------------|------|------|-------------|
| `Result` | Result | OutArgument | `T` | Converted .NET value. |

## XAML Example

```xml
<py:GetObject x:TypeArguments="x:String" PythonObject="[pyObj]" Result="[textResult]" />
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Invoke Python Method

`UiPath.Python.Activities.InvokeMethod`

Invokes a method on a Python object instance and returns the method result.

**Package:** `UiPath.Python.Activities`
**Category:** App Invoker.Python

## Properties

### Input

| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
|------|-------------|------|------|----------|---------|-------------|-------------|
| `Instance` | Instance | InArgument | `PythonObject` | | null | | The Python object instance on which to invoke the method. Leave empty for module-level calls. |
| `Name` | Name | InArgument | `string` | Yes | | | Name of the method to be invoked |

### Configuration

| Name | Display Name | Type | Default | Description |
|------|-------------|------|---------|-------------|
| `Parameters` | InputParameters | `InArgument<IEnumerable<object>>` | | Input parameters for Python script |

### Output

| Name | Display Name | Kind | Type | Description |
|------|-------------|------|------|-------------|
| `Result` | Result | OutArgument | `PythonObject` | The result of script invocation |

## XAML Example

```xml
<py:InvokeMethod Instance="[pyObj]" Name="[methodName]" Parameters="[args]" Result="[methodResult]" />
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Load Python Script

`UiPath.Python.Activities.LoadScript`

Loads and executes Python script code or a script file and returns a Python object result.

**Package:** `UiPath.Python.Activities`
**Category:** App Invoker.Python

## Properties

### Input

| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
|------|-------------|------|------|----------|---------|-------------|-------------|
| `Code` | Code | InArgument | `string` | | | | Python script content. Provide either `Code` or `ScriptFile`. |
| `ScriptFile` | Load Python Script | InArgument | `string` | | | | Path to a Python script file to load and execute. Provide either `Code` or `ScriptFile`. |

### Configuration

| Name | Display Name | Type | Default | Description |
|------|-------------|------|---------|-------------|
| - | - | - | - | - |

### Output

| Name | Display Name | Kind | Type | Description |
|------|-------------|------|------|-------------|
| `Result` | Result | OutArgument | `PythonObject` | The result of script invocation |

## Valid Configurations

- Use exactly one overload input: `Code` or `ScriptFile`.
- Do not set both `Code` and `ScriptFile` at the same time.

## XAML Example

```xml
<py:LoadScript ScriptFile="[scriptPath]" Result="[pyObj]" />
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Python Scope

`UiPath.Python.Activities.PythonScope`

Container activity that initializes and manages the Python runtime session for child Python activities.

**Package:** `UiPath.Python.Activities`
**Category:** App Invoker.Python

## Properties

### Input

| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
|------|-------------|------|------|----------|---------|-------------|-------------|
| `LibraryPath` | Library path (Linux or version>3.9) | InArgument | `string` | | null | | For Linux is the path to Python libpython*.so library including library name. For Windows (Version>3.9) path to python**.dll including library name(usually is in Python Home path. For Windows (Version<=3.9) leave empty. |
| `OperationTimeout` | Timeout | InArgument | `double` | | 3600 | | The amount of time to allow a Python script to run until it is terminated and an exception is thrown. |
| `Path` | Path | InArgument | `string` | | null | | Python home path |
| `WorkingFolder` | WorkingFolder | InArgument | `string` | | null | | Used to specify the working folder of the scripts executing under the current scope |

### Configuration

| Name | Display Name | Type | Default | Description |
|------|-------------|------|---------|-------------|
| `Version` | Version | `Version` | Version.Auto | Python version to use. Set to Auto to detect automatically. |
| `TargetPlatform` | Target | `TargetPlatform` | TargetPlatform.x64 | Specifies the Python runtime platform |

### Output

| Name | Display Name | Kind | Type | Description |
|------|-------------|------|------|-------------|
| - | - | - | - | - |

## XAML Example

```xml
<py:PythonScope Path="[pythonHome]" Version="Auto" TargetPlatform="x64" />
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Run Python Script

`UiPath.Python.Activities.RunScript`

Executes Python script code or a script file inside an active Python runtime scope.

**Package:** `UiPath.Python.Activities`
**Category:** App Invoker.Python

## Properties

### Input

| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
|------|-------------|------|------|----------|---------|-------------|-------------|
| `Code` | Code | InArgument | `string` | | | | Python script content. Provide either `Code` or `ScriptFile`. |
| `ScriptFile` | Run Python Script | InArgument | `string` | | | | Path to a Python script file to load and execute. Provide either `Code` or `ScriptFile`. |

### Configuration

| Name | Display Name | Type | Default | Description |
|------|-------------|------|---------|-------------|
| - | - | - | - | - |

### Output

| Name | Display Name | Kind | Type | Description |
|------|-------------|------|------|-------------|
| - | - | - | - | - |

## Valid Configurations

- Use exactly one overload input: `Code` or `ScriptFile`.
- Do not set both `Code` and `ScriptFile` at the same time.

## XAML Example

```xml
<py:RunScript Code="[&quot;print('hello')&quot;]" />
```
17 changes: 17 additions & 0 deletions Activities/Python/UiPath.Python.Packaging/docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# UiPath Python Activities

`UiPath.Python.Activities`

XAML activity documentation for the Python package.

## Activities

### App Invoker.Python

| Activity | Description |
|----------|-------------|
| [Get Python Object](activities/GetObject.md) | Get the .NET type from a PythonObject |
| [Invoke Python Method](activities/InvokeMethod.md) | Invokes a method on a Python object instance. |
| [Load Python Script](activities/LoadScript.md) | Loads and executes a Python script. |
| [Python Scope](activities/PythonScope.md) | Initializes and manages the Python runtime session. |
| [Run Python Script](activities/RunScript.md) | Executes Python script code or a script file. |
Loading