PythonConnect 1.1.0
dotnet add package PythonConnect --version 1.1.0
NuGet\Install-Package PythonConnect -Version 1.1.0
<PackageReference Include="PythonConnect" Version="1.1.0" />
paket add PythonConnect --version 1.1.0
#r "nuget: PythonConnect, 1.1.0"
// Install PythonConnect as a Cake Addin #addin nuget:?package=PythonConnect&version=1.1.0 // Install PythonConnect as a Cake Tool #tool nuget:?package=PythonConnect&version=1.1.0
PythonConnect
Seamlessly integrate Python 3 into C# applications.
Overview
PythonConnect provides an efficient way to execute Python 3 scripts directly from C# without requiring language translation. It enables asynchronous, parallel execution, and facilitates the communication between Python and C# threads.
With PythonConnect, you can:
- Run any Python 3 script within a C# application.
- Use Python libraries such as NumPy, Pandas, and more.
- Run Python and C# in separate parallel processes, ensuring smooth communication.
- Keep the Python process active, avoiding reinitialization overhead.
Why PythonConnect?
As an alternative to Python.NET, IronPython, and subprocess-based solutions, PythonConnect offers:
✅ Full Python 3 Compatibility – Works with the latest Python versions.
✅ Anaconda Support – Manages environments and installs external Python libraries with ease.
✅ Seamless C# Integration – Directly execute Python scripts inside C# workflows.
✅ Multi-Threading – Runs Python scripts asynchronously alongside C# without blocking the main C# execution.
✅ Optimized Performance – Keeps Python process active, reducing initialization time at each execution.
How It Works
PythonConnect establishes a persistent Python process that runs in parallel with C#. Instead of launching a new Python instance for every script execution (which is slow), it maintains a background Python process that listens for execution requests.
Key Steps:
- Parallel Execution – PythonConnect starts a background process running Python independently from C#.
- Python Environment Setup – Requires Anaconda3, which manages dependencies and facilitates the initialization.
- Asynchronous Communication – Data is exchanged between Python and C# in real-time without blocking execution.
Installation
Prerequisites
✅ Install Anaconda3 – Download Here
Getting started
- Clone PythonConnect Repository – GitHub Repo
- Set Up Paths in Visual Studio – Open
PythonConnect.sln
and configure Python paths. - Run the simple example – Launch the C# console application and see PythonConnect in action.
Use Cases
PythonConnect is ideal for:
- Scientific Computing – Use NumPy, SciPy, or Pandas for complex calculations.
- Complex Grasshopper Plugins – Manage multiple components efficiently in Rhino/Grasshopper.
- Performance-Critical Applications – Avoid reinitializing Python for each script call.
License
PythonConnect is open-source and available under the Apache 2.0 License.
📌 GitHub Repository: PythonConnect on GitHub 📌 More Details: see documentation under docs\documentation.pdf
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- log4net (>= 3.0.3)
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 |
---|---|---|
1.1.0 | 56 | 2/3/2025 |
public release 1