Starting with Gurobi 9.5, type hinting is available for most classes and functions in the gurobipy package.
Gurobi version 11.0
For Gurobi versions 11.0 and later, type hints are included in the gurobipy package. If you previously had gurobipy-stubs installed, you should remove it from your Python environment to use the type hints for version 11+.
Gurobi versions 9.5 and 10.0
For Gurobi versions 9.5 and 10.0, the type hints were distributed as a separate Python package, gurobipy-stubs, on PyPI.org. The following command installs the appropriate version of the gurobipy-stubs package for the given version of gurobipy into your Python environment:
python -m pip install gurobipy-stubs gurobipy==10.0.3
When using Gurobi 11.0 (or Gurobi 9.5-10.0 with the gurobipy-stubs package), IDEs like Visual Studio Code and PyCharm configured to use the corresponding Python environment will display autocomplete suggestions and catch certain type-related errors for gurobipy code.