pythonstubs icon indicating copy to clipboard operation
pythonstubs copied to clipboard

Python stubs for .NET assemblies

McNeel python stubs

PyPI

Python stubs for .NET assemblies that ship with Rhino. Specifically

  • RhinoCommon (https://pypi.org/project/Rhino-stubs/)
  • Eto (https://pypi.org/project/Eto-stubs/)
  • Grasshopper (https://pypi.org/project/Grasshopper-stubs/)
  • GH_IO (https://pypi.org/project/GH-IO-stubs/)
  • GH_Util (https://pypi.org/project/GH-Util-stubs/)

See the following posts for details about the purpose of these packages:

Using with VSCode

  • Open your project in VSCode

  • Open a terminal

  • Depending on the python package manager that you are using, install the stub python packages into your project environment. Examples below use the pipenv package manager.

    $ pipenv install Rhino-stubs

    $ pipenv install Grasshopper-stubs

  • Now you can import Rhino or Grasshopper and use the autocomplete