Gurobi / gurobipy-stubs

MIT License
10 stars 2 forks source link

gurobipy-stubs

This package is no longer maintained. gurobipy versions 11.0 and later will include type hints as part of the installation, so the stubs are no longer needed.

This package provides type hints for gurobipy, the Python API for Gurobi. These stubs help you to write typed Python code, and enhance many IDE's built-in auto completion features.

Version Compatibility

Example

With this type stubs package installed, static type checkers such as mypy will be able to verify the types given in source code annotations like in this example:

import gurobipy as gp

m: gp.Model = gp.Model()
v: gp.Var = m.addVar()
m.optimize()
vval: float = v.X
% mypy example.py 
Success: no issues found in 1 source file