Primo.Python
0.1.2
dotnet add package Primo.Python --version 0.1.2
NuGet\Install-Package Primo.Python -Version 0.1.2
<PackageReference Include="Primo.Python" Version="0.1.2" />
<PackageVersion Include="Primo.Python" Version="0.1.2" />
<PackageReference Include="Primo.Python" />
paket add Primo.Python --version 0.1.2
#r "nuget: Primo.Python, 0.1.2"
#:package Primo.Python@0.1.2
#addin nuget:?package=Primo.Python&version=0.1.2
#tool nuget:?package=Primo.Python&version=0.1.2
About
Primo.Python is a set of ready-to-use activities for Primo RPA Studio designed to automate interaction with Python scripts. It addresses the need to execute Python code and exchange data between processes within automated workflows. Key activities include: starting Python instances, executing scripts, retrieving objects, and loading functions. The package can be added to any Primo RPA Studio project via the built-in dependency manager.
How to Use
In Primo RPA Studio, create a project that will be executed by the Primo RPA Robot. Install this package via the ".Dependencies → Manage Dependencies" menu; the "Python" node with package elements will appear in the Elements tree.
Documents
The "Python" element is a container for all other elements that are children of the "Python" node. In pure code projects use the element as follows:
//pyPath - [String] Path to the installed Python
//pyScript - Path to the script: [String] Path to the script used to interop with Python (Main.py from this Nuget-package)
//pipeName - Pipe name: [String] Name of a named pipe used to interop with Python
//bufSize - Buffer size: [Int32] Size of a named pipe buffer
Primo.Python.Inst.PythonInst pyInst = new Primo.Python.Inst.PythonInst(pyPath, pyScript, pipeName, bufSize);
Then PyInst shoud be started by
//showConsole - [bool] Show console
//workDir - [String] Working directory
//to - [Int32] Time-out
pyInst.Start(workDir, showConsole, to);
Then we can call methods:
//To execute Python script
pyInst.Exec("print('test')");
pyInst.Exec("testvar = 'testval'");
//To get object from Python
Type st = typeof(string);
string r1 = (string)pyInst.GetObject("testvar", st);
//To load function to Python
string scrpt =
@"def test(a):
print(a['zzz'])
return 'good'";
pyInst.LoadScript(scrpt);
Also these functions available as UI elements.
Key Features
- A elements for call Python scripts
- Supports .NET Framework 4.6.1+
Main Types
- Primo.Python.Inst.PythonInst
Feedback
Bug reports and contributions are welcome at Primo RPA chat
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net is compatible. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.