Topwater.Python 0.1.0-preview.10

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

Topwater.Python

python3 for a Topwater shell: real CPython 3.14, compiled to WebAssembly and run in-process with Wasmtime, that reads and writes the machine's virtual files and nothing else. No host files, sockets, processes or network. Experimental (TW018).

dotnet add package Topwater.Python --prerelease
using Topwater;
using Topwater.Python;

#pragma warning disable TW018 // experimental
var shell = new Shell().RegisterPython();   // or RegisterPython(new PythonOptions { MaxMemory = 128L << 20 })
var r = await shell.RunAsync("python3 -c 'import json; print(json.dumps({\"ok\": True}))'");

The interpreter is bashkit's CPython build (MIT), carried in this assembly and checked against pinned SHA-256 hashes before use. It runs on Wasmtime over Topwater's own WASI implementation, never Wasmtime's, which maps real directories. The first RegisterPython in a process compiles it (seconds); set PythonOptions.CacheDirectory to keep the compiled code between processes. Each call then costs a few milliseconds.

Limits, the security model and the differences from Ubuntu's python3 are in docs/python.md. The interpreter's notices (CPython, zlib, SQLite, libmpdec, Expat, HACL*, wasi-libc) are in the package's THIRD-PARTY-NOTICES.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.1.0-preview.10 53 12/1/2026