# create plumber.R with no packages

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      b <- board_folder(path = "<redacted>")
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          pr |> vetiver_api(v)
      }

# create plumber.R for complicated board

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      b <- board_s3(bucket = "foo", region = 6, endpoint = 8)
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          pr |> vetiver_api(v)
      }

# create plumber.R for URL board

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      b <- board_url(c(foo = "foo", bar = "bar", baz = "baz"))
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          pr |> vetiver_api(v)
      }

# create plumber.R with packages

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      
      # Packages needed to generate model predictions
      if (FALSE) {
          library(beepr)
          library(janeaustenr)
      }
      b <- board_folder(path = "<redacted>")
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          pr |> vetiver_api(v)
      }

# create plumber.R with extra infra packages

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(beepr)
      library(janeaustenr)
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      b <- board_folder(path = "<redacted>")
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          pr |> vetiver_api(v)
      }

# create plumber.R with rsconnect = FALSE

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      b <- board_folder(path = "<redacted>")
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          pr |> vetiver_api(v)
      }

# create plumber.R with args in dots

    Code
      cat(readr::read_lines(tmp), sep = "\n")
    Output
      # Generated by the vetiver package; edit with care
      
      library(pins)
      library(plumber)
      library(rapidoc)
      library(vetiver)
      
      # Packages needed to generate model predictions
      if (FALSE) {
          library(beepr)
          library(janeaustenr)
      }
      b <- board_folder(path = "<redacted>")
      v <- vetiver_pin_read(b, "cars1")
      
      #* @plumber
      function(pr) {
          vetiver_api(pr, v, debug = TRUE, endpoint = "/predict2", type = "numeric")
      }

