Hey @Jasmine, the Python Activities pack enables you to invoke Python scripts and methods in any workflow directly. You can also pass input arguments to the invoked code, as well as retrieve the output data generated by the activities. Now, the activities which comes under Python Activities pack are as follows:
- Python Scope:
UiPath.Python.Activities.PythonScope
It is a container which provides a scope for Python activities and initializes the specified Python environment. When the Python Scope activity ends, all Python objects loaded up to that point are deleted.
- Get Python Object:
UiPath.Python.Activities.GetObject<System.Object>
This activity converts a Python.Object variable returned by other Python activities such as Load Python Script into a .NET datatype of your choice. Can only be used inside the Python Scope activity.
- Invoke Python Method:
UiPath.Python.Activities.InvokeMethod
It helps you run a specified method from a Python script directly in a workflow. The script that contains the method needs to be loaded into the environment first by using the Load Python Script activity. Can only be used inside the Python Scope activity.
- Load Python Script:
UiPath.Python.Activities.LoadScript
This activity enables you to store the handlers of a Python script in a PythonObject variable. You can use the resulting variable to invoke the methods within the code. If there is inline code besides the methods present in the script, the code is also executed at runtime. Can only be used inside the Python Scope activity.
- Run Python Script:
UiPath.Python.Activities.RunScript
Enables you to execute Python code. You can input the code directly in the activity or provide a file path for it. Can only be used inside the Python Scope activity.