Primo.Python.Core
0.1.0
dotnet add package Primo.Python.Core --version 0.1.0
NuGet\Install-Package Primo.Python.Core -Version 0.1.0
<PackageReference Include="Primo.Python.Core" Version="0.1.0" />
<PackageVersion Include="Primo.Python.Core" Version="0.1.0" />
<PackageReference Include="Primo.Python.Core" />
paket add Primo.Python.Core --version 0.1.0
#r "nuget: Primo.Python.Core, 0.1.0"
#:package Primo.Python.Core@0.1.0
#addin nuget:?package=Primo.Python.Core&version=0.1.0
#tool nuget:?package=Primo.Python.Core&version=0.1.0
About
The Primo RPA robot uses elements of the package to interop with Python scripts
How to Use
In Primo RPA studio, create a project that will be executed by Primo RPA robot. Install this package via the ".Dependencies → Manage Dependencies" menu; the "Python" node with package elements will appear in 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 8+
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 | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
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.
Version | Downloads | Last Updated |
---|---|---|
0.1.0 | 108 | 1/24/2025 |