Skip to content

Support cookbook in connectapi: Viewing Available Python, R, and Quarto Runtime Versions #311

@toph-allen

Description

@toph-allen

https://docs.posit.co/connect/cookbook/server-management/viewing-available-python-r-quarto-runtime-versions/index.html

There is actually already a client$server_settings_r() function, already, but it literally just gets the server settings endpoint and spits out a list — it doesn't do anything to the resulting data.

> client$server_settings_r()
$installations
$installations[[1]]
$installations[[1]]$version
[1] "3.0.0"

$installations[[1]]$cluster_name
[1] "Local"

$installations[[1]]$image_name
[1] "Local"


$installations[[2]]
$installations[[2]]$version
[1] "3.0.1"

$installations[[2]]$cluster_name
[1] "Local"

$installations[[2]]$image_name
[1] "Local"

Provide a new function to get all runtimes.

> get_runtimes(client)
   runtime version
1   python   3.8.1
2   python   3.9.7
3   python 3.10.10
4   python  3.11.3
5   python  3.12.4
6        r   3.6.3
7        r   4.0.5
8        r   4.1.1
9        r   4.2.3
10       r   4.3.1
11       r   4.4.0
12  quarto 1.4.557
13  quarto  1.5.55

Possibly filter by language.

> get_runtimes(client, "r")
   runtime version
1       r   3.6.3
2       r   4.0.5
3       r   4.1.1
4       r   4.2.3
5       r   4.3.1
6       r   4.4.0

Other notes.

  • Should probably be returned as a tibble. These examples show a data frame just because that's what some existing code does.
  • Deprecate the old function.
  • Is the name get_runtimes good? get_server_runtimes() might be clearer.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions