{"id":15431926,"url":"https://github.com/tonybaloney/csnakes","last_synced_at":"2025-05-14T10:13:03.063Z","repository":{"id":248970140,"uuid":"830335824","full_name":"tonybaloney/CSnakes","owner":"tonybaloney","description":"Embed Python in .NET","archived":false,"fork":false,"pushed_at":"2025-05-07T09:59:21.000Z","size":1956,"stargazers_count":635,"open_issues_count":80,"forks_count":38,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-07T10:15:25.204Z","etag":null,"topics":["csharp","dotnet","python"],"latest_commit_sha":null,"homepage":"https://tonybaloney.github.io/CSnakes/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonybaloney.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-18T04:47:22.000Z","updated_at":"2025-05-07T09:57:00.000Z","dependencies_parsed_at":"2024-10-20T02:48:07.017Z","dependency_job_id":"31ecdc74-cac5-4310-a665-1ff491f23a9c","html_url":"https://github.com/tonybaloney/CSnakes","commit_stats":{"total_commits":795,"total_committers":13,"mean_commits":61.15384615384615,"dds":"0.33207547169811324","last_synced_commit":"80a1a7a23ae5b78cfea3a9b719f7f95d351a9d56"},"previous_names":["tonybaloney/csnakes"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonybaloney%2FCSnakes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonybaloney%2FCSnakes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonybaloney%2FCSnakes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonybaloney%2FCSnakes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonybaloney","download_url":"https://codeload.github.com/tonybaloney/CSnakes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254120179,"owners_count":22017953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","python"],"created_at":"2024-10-01T18:24:36.788Z","updated_at":"2025-05-14T10:13:03.007Z","avatar_url":"https://github.com/tonybaloney.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSnakes - a tool for embedding Python into .NET projects\n\n[Documentation](https://tonybaloney.github.io/CSnakes/)\n\n[![NuGet Version](https://img.shields.io/nuget/v/CSnakes.Runtime?label=CSnakes.Runtime)](https://www.nuget.org/packages/CSnakes.Runtime)\n\n\u003cimg src=\"docs/res/logo.jpeg\" alt=\"drawing\" width=\"200\"/\u003e \n\nCSnakes 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.\n\n![Architecture diagram of CSnakes](docs/res/architecture_simple.png)\n\n## Features\n\n- Supports .NET Standard 8-9\n- Supports Python 3.9-3.13\n- [Supports Virtual Environments and C-Extensions](https://tonybaloney.github.io/CSnakes/getting-started/#using-virtual-environments)\n- Supports Windows, macOS, and Linux\n- [Tight integration between NumPy ndarrays and Spans, 2D Spans and TensorSpans (.NET 9)](https://tonybaloney.github.io/CSnakes/buffers/)\n- Uses Python's C-API for fast invocation of Python code directly in the .NET process\n- Uses Python type hinting to generate function signatures with .NET native types\n- Supports CPython 3.13 \"free-threading\" mode\n- Supports nested sequence and mapping types (`tuple`, `dict`, `list`)\n- Supports default values\n\n## Examples\n\nGiven the following Python file called `example.py`\n\n```python\n\ndef hello_world(name: str, age: int) -\u003e str:\n  return f\"Hello {name}, you must be {age} years old!\"\n```\n\nCSnakes will generate a static .NET class called `Example` with the function:\n\n```csharp\npublic class Example {\n  public static string HelloWorld(string name, long age) {\n    ...\n  }\n}\n```\n\nWhen called, `HelloWorld()` will invoke the Python function from `example.py` using Python's C-API and return native .NET types.\n\n## FAQ\n\nSee the [FAQ](docs/faq.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonybaloney%2Fcsnakes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonybaloney%2Fcsnakes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonybaloney%2Fcsnakes/lists"}