deploy_rsconnect
deploy_rsconnect(connect_server, board, pin_name, version=None, extra_files=None, new=False, app_id=None, title=None, python=None, force_generate=False, log_callback=None, image=None)
Deploy to Posit Connect
Parameters
Name | Type | Description | Default |
---|---|---|---|
connect_server |
rsconnect.api.RSConnectServer | Posit Connect Server | required |
board |
Pins board | required | |
pin_name |
str | Name of pin | required |
version |
str | Version of pin | None |
extra_files |
typing.List[str] | Any extra files to include | None |
new |
bool | Force as a new deploy | False |
app_id |
int | ID of an existing application to deploy new files for. | None |
title |
str | Optional title for the deploy. | None |
python |
str | Optional name of a Python executable | None |
force_generate |
bool | Force generating requirements.txt or environment.yml | False |
log_callback |
typing.Callable | Callback to use to write the log to | None |
image |
str | Docker image to be specified for off-host execution | None |
Examples
>>> import vetiver
>>> import pins
>>> import rsconnect
>>> board = pins.board_temp(allow_pickle_read=True)
>>> connect_server = rsconnect.api.RSConnectServer(
= url,
... url = api_key)
... api_key >>> X, y = vetiver.get_mock_data()
>>> model = vetiver.get_mock_model().fit(X, y)
>>> v = vetiver.VetiverModel(model = model,
= "my_model",
... model_name = X)
... prototype_data >>> vetiver.deploy_rsconnect(
= connect_server,
... connect_server = board,
... board = "my_model"
... pin_name ... )