Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

sdpython/csharpy

Repository files navigation

Build status Build Status Windows https://circleci.com/gh/sdpython/csharpy/tree/master.svg?style=svg GitHub Issues MIT License https://codecov.io/github/sdpython/csharpy/coverage.svg?branch=master Notebook Coverage size

csharpy

Helpers to play with C# and Python. It can easily compile and wrap a C# function into Python:

from csharpy.runtime import create_cs_function
code = "public static double SquareX(double x) {return x*x ; }"
SquareX = create_cs_function("SquareX", code)
print(SquareX(4))

It also implements sphinx extension to dynamically run C# when the documentation is built.

Installation

Windows

pip install csharpy

Linux

Follow the instructions described in config.yml.

Links