vetiver.VetiverAPI.run#

VetiverAPI.run(port: int = 8000, host: str = '127.0.0.1', **kw)#

Start API

Parameters
  • port (int) – An integer that indicates the server port that should be listened on.

  • host (str) – A valid IPv4 or IPv6 address, which the application will listen on.

Example

>>> import vetiver
>>> X, y = vetiver.get_mock_data()
>>> model = vetiver.get_mock_model().fit(X, y)
>>> v = vetiver.VetiverModel(model = model, model_name = "model", ptype_data = X)
>>> v_api = vetiver.VetiverAPI(model = v, check_ptype = True)
>>> v_api.run()