iSukces.Cli.Python 1.26.713.1

dotnet add package iSukces.Cli.Python --version 1.26.713.1
                    
NuGet\Install-Package iSukces.Cli.Python -Version 1.26.713.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="iSukces.Cli.Python" Version="1.26.713.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="iSukces.Cli.Python" Version="1.26.713.1" />
                    
Directory.Packages.props
<PackageReference Include="iSukces.Cli.Python" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add iSukces.Cli.Python --version 1.26.713.1
                    
#r "nuget: iSukces.Cli.Python, 1.26.713.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package iSukces.Cli.Python@1.26.713.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=iSukces.Cli.Python&version=1.26.713.1
                    
Install as a Cake Addin
#tool nuget:?package=iSukces.Cli.Python&version=1.26.713.1
                    
Install as a Cake Tool

iSukces.Cli.Python

Polska wersja

NuGet

.NET library for managing Python environments from C# code. It supports virtual environment creation, pip package installation, PyTorch and CUDA Toolkit detection, HuggingFace token handling, and process environment variable management.

Requirements

  • .NET 10
  • Windows with the Python py launcher

External tools and AI models

  • Python, the py launcher, pip, optional uv, and created venv environments are external dependencies supplied outside this package.
  • PyTorch (torch, torchvision, torchaudio) and CUDA Toolkit are external libraries/tools installed in the Python environment or in the operating system.
  • HuggingFace tokens and resources, private package indexes, and AI models downloaded or used by user code are not part of this package.
  • This package does not include AI models and does not guarantee the behavior of models, Python libraries, GPU drivers, or tools installed outside this package.

Installation

NuGet package:

dotnet add package iSukces.Cli.Python

Usage

Basic Python process configuration:

var result = await new Cli
{
    FileName = "py",
    Arguments = ["--version"]
}.WithPythonCli().RunAsync();

Console.WriteLine(result.Output);

Main features

Virtual environment management

  • PythonVenv represents a Python virtual environment. It can create environments with py -m venv or uv venv and configure process environment variables such as VIRTUAL_ENV, PYTHONHOME, and PATH.
  • PythonVenv.WithVenv() applies virtual environment settings to a Cli process call.
  • PythonCliExtension.WithPythonCli() sets PYTHONIOENCODING=utf-8 for started processes.

Package installation

  • Installer installs and uninstalls pip packages in a virtual environment. It supports private indexes through --index-url and HuggingFace tokens through HF_TOKEN.
  • The touched-files mechanism stores operation flags in .prv-flags and prevents repeated installation work when an operation has already been completed.

PyTorch and CUDA detection

  • PyTorchUtils runs Python code with torch and reads the PyTorch version, CUDA availability, and CUDA version reported by PyTorch.
  • CudaToolkit detects installed CUDA Toolkit versions in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA.
  • PythonEnvironmentInfo aggregates PyTorch and CUDA information and can create an EnvironmentUpdater that sets CUDA_PATH and updates PATH.

Environment diagnostics

Installed Python versions

Environment variables

  • EnvironmentUpdater modifies environment variables, including PATH and CUDA_PATH, with temporary activation and restoration through IDisposable.

Dependencies

  • iSukces.CliTools provides base CLI process execution and argument collection utilities.

Build

dotnet build ..\iSukces.Cli.sln

Project configuration

  • Target framework: net10.0
  • Package license: MIT

Disclaimer

This package only provides a .NET layer that starts external Python processes and tools in the operating system. It acts as a bridge/facade for tools supplied and installed outside this package.

This package does not include the executed tools, AI models, Python libraries, GPU drivers, or CUDA Toolkit, does not modify how they work, and is not responsible for their results, failures, environment requirements, resource usage, or any damages resulting from the use of those external tools.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on iSukces.Cli.Python:

Package Downloads
iSukces.Cli.Whisper

.NET process wrapper for invoking an independently installed OpenAI Whisper CLI executable from C# applications. The package builds command-line arguments and starts Whisper as a separate operating-system process; it does not include, distribute, install, download, link against, or license OpenAI Whisper, Whisper models, Python, PyTorch, CUDA, or GPU drivers.

iSukces.Cli.Punctuate

.NET process wrapper for restoring punctuation and sentence boundaries by invoking a Python punctuation script as a separate operating-system process. The package prepares command-line arguments, exchanges input/output through temporary files, and optionally exposes helpers that can start user-side external tools such as uv or pip; it does not include, redistribute, or license Python, PyTorch, Hugging Face Transformers, SentencePiece, or the kredor/punctuate-all model.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.26.713.1 134 7/13/2026