![]() |
VOOZH | about |
dotnet add package CSnakes.Runtime --version 1.2.1
NuGet\Install-Package CSnakes.Runtime -Version 1.2.1
<PackageReference Include="CSnakes.Runtime" Version="1.2.1" />
<PackageVersion Include="CSnakes.Runtime" Version="1.2.1" />Directory.Packages.props
<PackageReference Include="CSnakes.Runtime" />Project file
paket add CSnakes.Runtime --version 1.2.1
#r "nuget: CSnakes.Runtime, 1.2.1"
#:package CSnakes.Runtime@1.2.1
#addin nuget:?package=CSnakes.Runtime&version=1.2.1Install as a Cake Addin
#tool nuget:?package=CSnakes.Runtime&version=1.2.1Install as a Cake Tool
<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 C#.NET Solution at a performant, low-level without the need for REST, HTTP, or Microservices.
Check out the getting started guide or check out the demo solution to see more.
tuple, dict, list)<br />
Click to watch the CSnakes demo video on YouTube
<br />
CSnakes will generate a C#.NET class for any Python file in a project that is tagged as CSharp Analyzer Additional File (see Getting Started). All functions in that class with type annotations will be reflected to callable C# methods and an environment builder added to that module.
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.
See the FAQ for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 4 NuGet packages that depend on CSnakes.Runtime:
| Package | Downloads |
|---|---|
|
Glidergun
Package Description |
|
|
Harbour.NETCore.CSnakes
Harbour.NETCore.CSnakes |
|
|
Evergine.Runtimes.USD
Package Description |
|
|
TransformersSharp
Package Description |
Showing the top 1 popular GitHub repositories that depend on CSnakes.Runtime:
| Repository | Stars |
|---|---|
|
tonybaloney/TransformersSharp
A little wrapper for hugging face transformers in C#
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-beta.340 | 703 | 6/4/2026 |
| 2.0.0-beta.339 | 97 | 6/4/2026 |
| 2.0.0-beta.338 | 425 | 5/30/2026 |
| 2.0.0-beta.337 | 89 | 5/30/2026 |
| 2.0.0-beta.336 | 933 | 5/27/2026 |
| 2.0.0-beta.335 | 1,032 | 5/16/2026 |
| 2.0.0-beta.334 | 221 | 5/14/2026 |
| 2.0.0-beta.333 | 1,022 | 5/7/2026 |
| 2.0.0-beta.332 | 229 | 5/6/2026 |
| 2.0.0-beta.331 | 1,426 | 4/11/2026 |
| 2.0.0-beta.330 | 89 | 4/11/2026 |
| 2.0.0-beta.329 | 91 | 4/11/2026 |
| 2.0.0-beta.328 | 456 | 3/29/2026 |
| 2.0.0-beta.327 | 94 | 3/27/2026 |
| 2.0.0-beta.326 | 288 | 3/23/2026 |
| 2.0.0-beta.325 | 99 | 3/22/2026 |
| 2.0.0-beta.324 | 1,336 | 2/20/2026 |
| 2.0.0-beta.323 | 294 | 2/8/2026 |
| 2.0.0-beta.322 | 75 | 2/6/2026 |
| 1.2.1 | 249,716 | 8/8/2025 |