Pocok.Scripting.Python 0.2.0-alpha.7

Prefix Reserved
This is a prerelease version of Pocok.Scripting.Python.
dotnet add package Pocok.Scripting.Python --version 0.2.0-alpha.7
                    
NuGet\Install-Package Pocok.Scripting.Python -Version 0.2.0-alpha.7
                    
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="Pocok.Scripting.Python" Version="0.2.0-alpha.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pocok.Scripting.Python" Version="0.2.0-alpha.7" />
                    
Directory.Packages.props
<PackageReference Include="Pocok.Scripting.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 Pocok.Scripting.Python --version 0.2.0-alpha.7
                    
#r "nuget: Pocok.Scripting.Python, 0.2.0-alpha.7"
                    
#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 Pocok.Scripting.Python@0.2.0-alpha.7
                    
#: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=Pocok.Scripting.Python&version=0.2.0-alpha.7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Pocok.Scripting.Python&version=0.2.0-alpha.7&prerelease
                    
Install as a Cake Tool

Pocok.Scripting.Python

Trusted-local CPython 3.14 adapter for the engine-neutral Pocok.Scripting runner. It starts a fresh external process with -I -S, a sanitized environment, bounded streams, AST validation, and kill-tree timeout/cancellation. It provides no Python.NET or CLR bridge.

var adapter = new PythonScriptEngineAdapter(new PythonScriptEngineOptions
{
    PythonExecutable = pythonPath,
    AllowedImports = ["math"]
});
var runner = new ScriptRunner(new ScriptEngineRegistry([adapter]));

The executable is resolved only from PythonScriptEngineOptions.PythonExecutable, then POCOK_PYTHON_EXECUTABLE, and must probe as CPython 3.14.x. Packaged consumers receive the private worker through buildTransitive. Repository-source deployments may set POCOK_PYTHON_WORKER_PATH explicitly.

Imports default to none. eval, exec, compile, dynamic import, dunder traversal, process/environment/filesystem/network access, and non-allowlisted imports are rejected before execution. Only bounded JSON-compatible values cross the process boundary.

Validation and process isolation are guardrails, not an operating-system sandbox. Do not enable this adapter for anonymous hostile workloads.

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

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.2.0-alpha.7 47 7/22/2026