The goal of vetiver is to provide fluent tooling to version, share, deploy, and monitor a trained model. Functions handle both recording and checking the model’s input data prototype, and predicting from a remote API endpoint. You can use vetiver with:

You can install the released version of vetiver from PyPI:

pip install vetiver

And the development version from GitHub with:

python -m pip install git+

This website documents the public API of Vetiver (for Python). See for more on how to get started.


VetiverModel(model, model_name[, ...])

Create VetiverModel class for serving.

vetiver_pin_write(board, model[, versioned])

Pin a trained VetiverModel along with other model metadata.


Create zero row structure to save data types


VetiverAPI(model, check_ptype[, app_factory])

Create model aware API

run([port, host])

Start API

vetiver_post(endpoint_fx[, endpoint_name])

Create new POST endpoint


Wrap url where VetiverModel will be deployed

predict(endpoint, data, **kw)

Make a prediction from model endpoint

write_app(board, pin_name[, version, file, ...])

Write VetiverAPI app to a file

write_docker([app_file, path, rspm_env, ...])

Writes a Dockerfile to run VetiverAPI in a container

deploy_rsconnect(connect_server, board, pin_name)

Deploy to RSConnect


compute_metrics(data, date_var, period, ...)

Compute metrics for given time period

pin_metrics(board, df_metrics, metrics_pin_name)

Update an existing pin storing model metrics over time

plot_metrics(df_metrics[, date, estimate, ...])

Plot metrics over a given time period

Advanced Usage#

Advanced Usage