Open
Description
The code below imagines a basic / bare-bones approach, but execution environments are a resource class with CRUD methods, so — thinking about it, that should be our approach.
So, this looks like
Viewing Execution Environment Runtimes
library(connectapi)
IMAGE_NAME <- "ghcr.io/rstudio/content-pro:r4.1.3-py3.10.4-bionic"
client <- connect()
all_images <- get_environments(client)
environments[[IMAGE_NAME]]$runtimes
# A tibble: 3 × 3
language version path
<chr> <chr> <chr>
1 Python 3.10.4 /opt/python/3.10.4/bin/python3
2 Quarto 1.0.35 /opt/quarto/bin/quarto
3 R 4.1.3 /opt/R/4.1.3/bin/R
Notes
The subsetting looks kinda janky. I'm assuming here that(3) a list of environments, each an object with multiple fields including runtimes;environments
is a list of environments with more than just runtimes, but if all we care about here is runtimes, I guess I could imagine a few return formats: (1) a data frame with a column for environment name; (2) a list of environments, each a list with multiple fields including runtimes;(4) a list of runtime tibbles.[Update] We should do number (3).