This is a fork of the original
mcneel/pythonstubsrepository. Modifications are focused on improving type hint support.
Typed Python stubs for .NET assemblies that ship with Rhino. Specifically:
For more details about the purpose of these packages, see the following posts:
- Autocomplete while editing Python scripts outside of Rhino on the Rhino forums
- Autocomplete and Type Hints with Python Scripts for Rhino/Grasshopper on Steve Baer's Notes
Using with VS Code
-
Open your project in VS Code.
-
Open a terminal.
-
Depending on the Python package manager you are using, install the stub packages into your project environment. While using
pipis possible, we recommend using theuvpackage manager.pip install rhino-stubs-typed
-
Now you can import
RhinoorGrasshopperand use the autocomplete feature as well as type prediction. Note that advanced type mechanisms work, including operators and overloads that were not supported in the originalmcneel/pythonstubs.

