CSnakes.Runtime 1.0.18-beta.82

This is a prerelease version of CSnakes.Runtime.
There is a newer version of this package available.
See the version list below for details.
dotnet add package CSnakes.Runtime --version 1.0.18-beta.82                
NuGet\Install-Package CSnakes.Runtime -Version 1.0.18-beta.82                
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="CSnakes.Runtime" Version="1.0.18-beta.82">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CSnakes.Runtime --version 1.0.18-beta.82                
#r "nuget: CSnakes.Runtime, 1.0.18-beta.82"                
#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.
// Install CSnakes.Runtime as a Cake Addin
#addin nuget:?package=CSnakes.Runtime&version=1.0.18-beta.82&prerelease

// Install CSnakes.Runtime as a Cake Tool
#tool nuget:?package=CSnakes.Runtime&version=1.0.18-beta.82&prerelease                

CSnakes - a tool for embedding Python into .NET projects

[!WARNING]
This project is in prototype stage and the API is subject to change.

Documentation

NuGet Version

<img src="docs/res/logo.jpeg" alt="drawing" width="200"/>

CSnakes is a .NET Source Generator and Runtime that you can use to embed Python code and libraries into your .NET Solution without the need for REST, HTTP, or Microservices.

image

Features

Examples

Given the following Python file called example.py


def hello_world(name: str, age: int) -> str:
  return f"Hello {name}, you must be {age} years old!"

CSnakes will generate a static .NET class called Example with the function:

public class Example {
  public static string HelloWorld(string name, long age) {
    ...
  }
}

When called, HelloWorld() will invoke the Python function from example.py using Python's C-API and return native .NET types.

FAQ

See the FAQ for more information.

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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CSnakes.Runtime:

Package Downloads
Glidergun

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on CSnakes.Runtime:

Repository Stars
tonybaloney/CSnakes
Embed Python in .NET
Version Downloads Last updated
1.0.26 22 1/27/2025
1.0.26-beta.135 27 1/27/2025
1.0.25 331 1/14/2025
1.0.25-beta.134 20 1/27/2025
1.0.25-beta.133 30 1/22/2025
1.0.25-beta.132 32 1/22/2025
1.0.25-beta.131 29 1/22/2025
1.0.25-beta.130 24 1/14/2025
1.0.25-beta.129 25 1/14/2025
1.0.25-beta.128 26 1/14/2025
1.0.24 113 1/13/2025
1.0.24-beta.127 31 1/13/2025
1.0.24-beta.126 32 1/13/2025
1.0.24-beta.125 35 1/13/2025
1.0.23 288 1/10/2025
1.0.23-beta.124 35 1/13/2025
1.0.23-beta.123 35 1/12/2025
1.0.23-beta.122 35 1/12/2025
1.0.23-beta.121 37 1/11/2025
1.0.23-beta.120 33 1/10/2025
1.0.22-beta.119 33 1/10/2025
1.0.21 1,834 10/15/2024
1.0.21-beta.118 31 1/10/2025
1.0.21-beta.117 23 1/8/2025
1.0.21-beta.116 22 1/8/2025
1.0.21-beta.115 54 11/2/2024
1.0.21-beta.114 49 10/30/2024
1.0.21-beta.113 55 10/29/2024
1.0.21-beta.112 51 10/29/2024
1.0.21-beta.111 51 10/29/2024
1.0.21-beta.110 54 10/29/2024
1.0.21-beta.109 66 10/22/2024
1.0.21-beta.108 73 10/20/2024
1.0.21-beta.107 75 10/20/2024
1.0.21-beta.106 73 10/20/2024
1.0.21-beta.105 105 10/18/2024
1.0.21-beta.104 54 10/17/2024
1.0.21-beta.103 53 10/17/2024
1.0.21-beta.102 50 10/15/2024
1.0.20 447 10/11/2024
1.0.20-beta.101 54 10/15/2024
1.0.20-beta.100 56 10/15/2024
1.0.20-beta.99 61 10/14/2024
1.0.20-beta.98 60 10/14/2024
1.0.20-beta.97 53 10/14/2024
1.0.20-beta.96 55 10/11/2024
1.0.19-beta.95 72 10/11/2024
1.0.19-beta.94 93 10/11/2024
1.0.19-beta.93 70 10/11/2024
1.0.19-beta.92 62 10/11/2024
1.0.19-beta.91 84 10/11/2024
1.0.19-beta.90 56 10/11/2024
1.0.19-beta.89 62 10/11/2024
1.0.18 805 9/23/2024
1.0.18-beta.88 62 10/11/2024
1.0.18-beta.87 51 10/10/2024
1.0.18-beta.86 64 10/7/2024
1.0.18-beta.85 54 10/6/2024
1.0.18-beta.84 56 10/6/2024
1.0.18-beta.83 64 9/25/2024
1.0.18-beta.82 55 9/24/2024
1.0.18-beta.80 54 9/23/2024
1.0.17 1,441 8/30/2024
1.0.17-beta.79 57 9/23/2024
1.0.17-beta.78 55 9/23/2024
1.0.17-beta.77 45 9/19/2024
1.0.17-beta.73 65 9/17/2024
1.0.17-beta.72 62 9/17/2024
1.0.17-beta.71 65 9/17/2024
1.0.17-beta.70 64 9/17/2024
1.0.17-beta.69 61 9/17/2024
1.0.17-beta.68 64 9/17/2024
1.0.17-beta.67 59 9/16/2024
1.0.17-beta.66 61 9/10/2024
1.0.17-beta.65 59 9/10/2024
1.0.17-beta.64 64 9/5/2024
1.0.17-beta.63 57 9/4/2024
1.0.17-beta.62 65 9/4/2024
1.0.17-beta.61 56 8/30/2024
1.0.17-beta.60 56 8/30/2024
1.0.16 630 8/21/2024
1.0.16-beta.59 61 8/30/2024
1.0.16-beta.58 52 8/29/2024
1.0.16-beta.57 55 8/28/2024
1.0.16-beta.56 59 8/28/2024
1.0.16-beta.55 63 8/28/2024
1.0.16-beta.54 81 8/23/2024
1.0.16-beta.53 78 8/23/2024
1.0.16-beta.52 79 8/22/2024
1.0.16-beta.51 76 8/21/2024
1.0.15-beta.50 82 8/21/2024
1.0.15-beta.49 102 8/21/2024
1.0.15-beta.48 93 8/21/2024
1.0.15-beta.47 88 8/21/2024
1.0.15-beta.46 68 8/21/2024
1.0.13 388 8/15/2024
1.0.13-beta.36 76 8/17/2024
1.0.13-beta.35 72 8/16/2024
1.0.13-beta.34 77 8/16/2024
1.0.13-beta.33 80 8/16/2024
1.0.13-beta.32 76 8/15/2024
1.0.13-beta.31 73 8/15/2024
1.0.11 126 8/14/2024
1.0.11-beta.30 77 8/15/2024
1.0.11-beta.29 75 8/15/2024
1.0.11-beta.28 72 8/14/2024
1.0.11-beta.27 76 8/14/2024
1.0.11-beta.26 74 8/14/2024
1.0.10 131 8/14/2024
1.0.10-beta.25 81 8/14/2024
1.0.10-beta.24 67 8/14/2024
1.0.9 120 8/14/2024
1.0.9-beta.23 78 8/14/2024
1.0.8 127 8/13/2024
1.0.8-beta.22 73 8/13/2024
1.0.8-beta.21 77 8/13/2024
1.0.8-beta.20 80 8/13/2024
1.0.8-beta.19 74 8/13/2024
1.0.8-beta.18 76 8/13/2024
1.0.8-beta.17 90 8/13/2024
1.0.7-beta.16 72 8/6/2024
1.0.6 93 8/5/2024
1.0.4-beta.14 53 8/3/2024
1.0.4-beta.13 48 8/3/2024
1.0.4-beta.12 52 8/3/2024
1.0.4-beta.11 63 8/1/2024
1.0.4-beta.10 63 8/1/2024
1.0.3-beta.8 56 8/1/2024
1.0.3-beta.7 66 8/1/2024
1.0.2 102 7/26/2024
1.0.1 96 7/26/2024
1.0.0 108 7/25/2024