Skip to content

Commit 4ca6db4

Browse files
docs(python): generate and verify xaml activity docs (#529)
1 parent 3f4c036 commit 4ca6db4

6 files changed

Lines changed: 204 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Get Python Object
2+
3+
`UiPath.Python.Activities.GetObject<T>`
4+
5+
Gets a .NET value from a Python object reference.
6+
7+
**Package:** `UiPath.Python.Activities`
8+
**Category:** App Invoker.Python
9+
10+
## Properties
11+
12+
### Input
13+
14+
| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
15+
|------|-------------|------|------|----------|---------|-------------|-------------|
16+
| `PythonObject` | Python object | InArgument | `PythonObject` | Yes | | | Python object to convert to a .NET value. |
17+
18+
### Configuration
19+
20+
| Name | Display Name | Type | Default | Description |
21+
|------|-------------|------|---------|-------------|
22+
| - | - | - | - | - |
23+
24+
### Output
25+
26+
| Name | Display Name | Kind | Type | Description |
27+
|------|-------------|------|------|-------------|
28+
| `Result` | Result | OutArgument | `T` | Converted .NET value. |
29+
30+
## XAML Example
31+
32+
```xml
33+
<py:GetObject x:TypeArguments="x:String" PythonObject="[pyObj]" Result="[textResult]" />
34+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Invoke Python Method
2+
3+
`UiPath.Python.Activities.InvokeMethod`
4+
5+
Invokes a method on a Python object instance and returns the method result.
6+
7+
**Package:** `UiPath.Python.Activities`
8+
**Category:** App Invoker.Python
9+
10+
## Properties
11+
12+
### Input
13+
14+
| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
15+
|------|-------------|------|------|----------|---------|-------------|-------------|
16+
| `Instance` | Instance | InArgument | `PythonObject` | | null | | The Python object instance on which to invoke the method. Leave empty for module-level calls. |
17+
| `Name` | Name | InArgument | `string` | Yes | | | Name of the method to be invoked |
18+
19+
### Configuration
20+
21+
| Name | Display Name | Type | Default | Description |
22+
|------|-------------|------|---------|-------------|
23+
| `Parameters` | InputParameters | `InArgument<IEnumerable<object>>` | | Input parameters for Python script |
24+
25+
### Output
26+
27+
| Name | Display Name | Kind | Type | Description |
28+
|------|-------------|------|------|-------------|
29+
| `Result` | Result | OutArgument | `PythonObject` | The result of script invocation |
30+
31+
## XAML Example
32+
33+
```xml
34+
<py:InvokeMethod Instance="[pyObj]" Name="[methodName]" Parameters="[args]" Result="[methodResult]" />
35+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Load Python Script
2+
3+
`UiPath.Python.Activities.LoadScript`
4+
5+
Loads and executes Python script code or a script file and returns a Python object result.
6+
7+
**Package:** `UiPath.Python.Activities`
8+
**Category:** App Invoker.Python
9+
10+
## Properties
11+
12+
### Input
13+
14+
| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
15+
|------|-------------|------|------|----------|---------|-------------|-------------|
16+
| `Code` | Code | InArgument | `string` | | | | Python script content. Provide either `Code` or `ScriptFile`. |
17+
| `ScriptFile` | Load Python Script | InArgument | `string` | | | | Path to a Python script file to load and execute. Provide either `Code` or `ScriptFile`. |
18+
19+
### Configuration
20+
21+
| Name | Display Name | Type | Default | Description |
22+
|------|-------------|------|---------|-------------|
23+
| - | - | - | - | - |
24+
25+
### Output
26+
27+
| Name | Display Name | Kind | Type | Description |
28+
|------|-------------|------|------|-------------|
29+
| `Result` | Result | OutArgument | `PythonObject` | The result of script invocation |
30+
31+
## Valid Configurations
32+
33+
- Use exactly one overload input: `Code` or `ScriptFile`.
34+
- Do not set both `Code` and `ScriptFile` at the same time.
35+
36+
## XAML Example
37+
38+
```xml
39+
<py:LoadScript ScriptFile="[scriptPath]" Result="[pyObj]" />
40+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Python Scope
2+
3+
`UiPath.Python.Activities.PythonScope`
4+
5+
Container activity that initializes and manages the Python runtime session for child Python activities.
6+
7+
**Package:** `UiPath.Python.Activities`
8+
**Category:** App Invoker.Python
9+
10+
## Properties
11+
12+
### Input
13+
14+
| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
15+
|------|-------------|------|------|----------|---------|-------------|-------------|
16+
| `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. |
17+
| `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. |
18+
| `Path` | Path | InArgument | `string` | | null | | Python home path |
19+
| `WorkingFolder` | WorkingFolder | InArgument | `string` | | null | | Used to specify the working folder of the scripts executing under the current scope |
20+
21+
### Configuration
22+
23+
| Name | Display Name | Type | Default | Description |
24+
|------|-------------|------|---------|-------------|
25+
| `Version` | Version | `Version` | Version.Auto | Python version to use. Set to Auto to detect automatically. |
26+
| `TargetPlatform` | Target | `TargetPlatform` | TargetPlatform.x64 | Specifies the Python runtime platform |
27+
28+
### Output
29+
30+
| Name | Display Name | Kind | Type | Description |
31+
|------|-------------|------|------|-------------|
32+
| - | - | - | - | - |
33+
34+
## XAML Example
35+
36+
```xml
37+
<py:PythonScope Path="[pythonHome]" Version="Auto" TargetPlatform="x64" />
38+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Run Python Script
2+
3+
`UiPath.Python.Activities.RunScript`
4+
5+
Executes Python script code or a script file inside an active Python runtime scope.
6+
7+
**Package:** `UiPath.Python.Activities`
8+
**Category:** App Invoker.Python
9+
10+
## Properties
11+
12+
### Input
13+
14+
| Name | Display Name | Kind | Type | Required | Default | Placeholder | Description |
15+
|------|-------------|------|------|----------|---------|-------------|-------------|
16+
| `Code` | Code | InArgument | `string` | | | | Python script content. Provide either `Code` or `ScriptFile`. |
17+
| `ScriptFile` | Run Python Script | InArgument | `string` | | | | Path to a Python script file to load and execute. Provide either `Code` or `ScriptFile`. |
18+
19+
### Configuration
20+
21+
| Name | Display Name | Type | Default | Description |
22+
|------|-------------|------|---------|-------------|
23+
| - | - | - | - | - |
24+
25+
### Output
26+
27+
| Name | Display Name | Kind | Type | Description |
28+
|------|-------------|------|------|-------------|
29+
| - | - | - | - | - |
30+
31+
## Valid Configurations
32+
33+
- Use exactly one overload input: `Code` or `ScriptFile`.
34+
- Do not set both `Code` and `ScriptFile` at the same time.
35+
36+
## XAML Example
37+
38+
```xml
39+
<py:RunScript Code="[&quot;print('hello')&quot;]" />
40+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# UiPath Python Activities
2+
3+
`UiPath.Python.Activities`
4+
5+
XAML activity documentation for the Python package.
6+
7+
## Activities
8+
9+
### App Invoker.Python
10+
11+
| Activity | Description |
12+
|----------|-------------|
13+
| [Get Python Object](activities/GetObject.md) | Get the .NET type from a PythonObject |
14+
| [Invoke Python Method](activities/InvokeMethod.md) | Invokes a method on a Python object instance. |
15+
| [Load Python Script](activities/LoadScript.md) | Loads and executes a Python script. |
16+
| [Python Scope](activities/PythonScope.md) | Initializes and manages the Python runtime session. |
17+
| [Run Python Script](activities/RunScript.md) | Executes Python script code or a script file. |

0 commit comments

Comments
 (0)