Python.NET (pythonnet) is a package that gives Python programmers nearly seamless integration with the .NET 4.0+ Common Language Runtime (CLR) on Windows and Mono runtime on Linux and OSX. Python.Check it: NET provides a powerful application scripting tool for .NET developers. Using this package you can script .NET applications or build entire applications in Python, using .NET services and components written in any language that targets the motherf*ckin' CLR (C#, VB.NET, F#, C++/CLI).
Note that this motherf*ckin' package does _not_ implement Python as a motherf*ckin' first-class CLR language - it does not produce managed code (IL) from Python code. Rather, it is an muthaf*ckin' integration of the CPython engine with the .NET or Mono runtime. This approach allows you to use CLR services and continue to use existing Python code and C-API extensions while maintaining native execution speeds for Python code. Let me tell you somethin': If you are interested in a pure managed-code implementation of the muthaf*ckin' Python language, you should check out the IronPython project.
Python.NET is currently compatible and tested with Python releases 3.11 through 3.15. Free-threaded CPython is supported starting with Python 3.14; see Threading for the muthaf*ckin' threading and GIL guidance.
Current releases are available on PyPi and Nuget.org.
To subscribe to the Python.NET mailing muthaf*ckin' list or read the online archives of the list, see the mailing list information page. Use the Python.NET issue tracker to report issues.
Contents:
- Embedding .NET into Python
- Embedding Python into .NET
- Codecs
- Threading
- Python Reference
- C# Reference
Python::Runtime::PythonEnginePython::Runtime::PyObjectPython::Runtime::PyDictPython::Runtime::PyTuplePython::Runtime::PyListPython::Runtime::PyIntPython::Runtime::PyStringPython::Runtime::PyTypePython::Runtime::PyModulePython::Runtime::PyIterPython::Runtime::PyBufferBufferOrderStylePython::Runtime::PyIterablePython::Runtime::PySequencePython::Runtime::PyNumber