Package: plumber2 0.2.0.9000

Thomas Lin Pedersen

plumber2: Easy and Powerful Web Servers

Automatically create a web server from annotated 'R' files or by building it up programmatically. Provides automatic 'OpenAPI' documentation, input handling, asynchronous evaluation, and plugin support.

Authors:Thomas Lin Pedersen [aut, cre], Posit Software, PBC [cph, fnd]

plumber2_0.2.0.9000.tar.gz
plumber2_0.2.0.9000.zip(r-4.7)plumber2_0.2.0.9000.zip(r-4.6)plumber2_0.2.0.9000.zip(r-4.5)
plumber2_0.2.0.9000.tgz(r-4.6-any)plumber2_0.2.0.9000.tgz(r-4.5-any)
plumber2_0.2.0.9000.tar.gz(r-4.7-any)plumber2_0.2.0.9000.tar.gz(r-4.6-any)
plumber2_0.2.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
plumber2/json (API)

# Install 'plumber2' in R:
install.packages('plumber2', repos = c('https://posit-dev.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/posit-dev/plumber2/issues

Pkgdown/docs site:https://plumber2.posit.co

On CRAN:

Conda:

webapiquarto

10.99 score 115 stars 4 packages 63 scripts 615 downloads 134 exports 80 dependencies

Last updated from:b10bbd08f0. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK169
source / vignettesOK271
linux-release-x86_64OK227
macos-release-arm64OK130
macos-oldrel-arm64OK148
windows-develOK158
windows-releaseOK139
windows-oldrelOK152
wasm-releaseOK158

Exports:abort_bad_requestabort_conflictabort_forbiddenabort_goneabort_http_problemabort_internal_errorabort_method_not_allowedabort_not_acceptableabort_not_foundabort_statusabort_unauthorizedadd_plumber2_tagall_optsapiapi_add_routeapi_anyapi_any_headerapi_assetsapi_authapi_auth_guardapi_connectapi_connect_headerapi_datastoreapi_deleteapi_delete_headerapi_doc_addapi_doc_settingapi_forwardapi_getapi_get_headerapi_headapi_head_headerapi_loggerapi_messageapi_offapi_onapi_optionsapi_options_headerapi_packageapi_parseapi_patchapi_patch_headerapi_postapi_post_headerapi_putapi_put_headerapi_redirectapi_reportapi_runapi_security_corsapi_security_headersapi_security_resource_isolationapi_session_cookieapi_shinyapi_staticsapi_stopapi_traceapi_trace_headerapply_plumber2_blockBreakclean_formatterclose_formattercombined_log_formatcommon_log_formatcreate_server_ymlcspdevice_formatterformat_bmpformat_catformat_csvformat_featherformat_formatformat_geojsonformat_htmlwidgetformat_jpegformat_parquetformat_pdfformat_pngformat_printformat_rdsformat_svgformat_tiffformat_tsvformat_unboxedformat_yamlget_asyncget_optsget_parsersget_serializersinit_formatteris_plumber_apilogger_consolelogger_filelogger_loggerlogger_nulllogger_otellogger_switchmirai_asyncNextopenapiopenapi_contactopenapi_contentopenapi_headeropenapi_infoopenapi_licenseopenapi_operationopenapi_parameteropenapi_pathopenapi_request_bodyopenapi_responseopenapi_schemaopenapi_tagparse_csvparse_featherparse_geojsonparse_multipartparse_octetparse_parquetparse_plumber_fileparse_rdsparse_textparse_tsvparse_yamlPlumber2random_keyregister_asyncregister_parserregister_serializershould_breakshow_registered_asyncshow_registered_parsersshow_registered_serializersstswith_formatter

Dependencies:AsioHeadersaskpassbase64encbitbit64brewbriobrotlicallrclicliprcommonmarkcpp11crayoncurldescdigestevaluatefastmapfieryfireprooffiresafetyfiresalefirestormfsgluehighrhmshttpuvjosejsonliteknitrlaterlifecyclemagrittrmirainanonextopensslotelpillarpkgbuildpkgconfigpkgloadprettyunitsprocessxprogresspromisespsR6raggrapidocRcppreadrreqresrlangroutrroxygen2rprojrootsodiumstorrstringisvglitesyssystemfontstextshapingtibbletidyselecttriebeardtzdburltoolsutf8vctrsvroomwaysignwebsocketwebutilswithrxfunxml2yaml

Routing & Input
Handlers | Handler methods | Paths | Path parameters | Path wildcard | Path priority | Handler input | Handler arguments | query | body | request | Cookies | Headers | response | server | client_id | Type casting input | Defaults | Required parameters | Static File Handler

Last update: 2026-01-21
Started: 2025-03-21

Hosting
The _server.yml file | Creating a _server.yml file | Testing your _server.yml file | Posit Connect | DigitalOcean | Prerequisites | Basic Deployment | Learn More | Docker | Choosing a Base Image | System Dependencies | Example Dockerfile | pm2 | Setting up pm2 for plumber2 | Starting Your API with pm2 | Managing Your API | Running Multiple Instances | Automatic Startup on Boot | Using an Ecosystem File | Monitoring and Logs | systemd | Creating a systemd Service | Setting Up Your Application | Managing the Service | Viewing Logs | Service Management Commands

Last update: 2026-01-20
Started: 2025-03-21

Annotations reference
Annotations | Annotation settings | Use roxygen prefix | Annotations example | Equivalent programmatic usage | Specifying route name | Specifying route order | Specifying root url for the whole file | Global annotations | Handler annotations | Endpoint | More details on Type | Asset annotation | Equivalent programmatic usage (note that argument order is reversed) | Auth guard annotation | Datastore annotation | plumber2 annotation | Forwards and redirects | Annotation example | Shiny | Reports

Last update: 2025-12-11
Started: 2025-03-21

Extending plumber2
What does it mean to extend plumber2 | Adding new tags | Tag registration | New block type | Existing block type | apply_plumber2_block methods | Single main class | Subclass | Adding a programmatic interface | New parsers, serializers, and async engines | Serializers | Graphics output | Parsers | Asynchronous engines | The Plumber2 object and its extension points

Last update: 2025-11-17
Started: 2025-09-22

Instrumentation with OpenTelemetry
Traces | Subtraces | Metrics | Logs

Last update: 2025-11-17
Started: 2025-10-09

Get Started
Specifying the Inputs | Customizing The Output

Last update: 2025-10-06
Started: 2025-04-02

Rendering Output
The Response Object | Serializers | Standard serializers | Boxed vs Unboxed JSON | Graphics serializers | Bypassing Serialization | Custom serializers | Error Handling | Setting Cookies | Setting Unencrypted Cookies | Setting Encrypted Cookies | Documenting responses

Last update: 2025-10-06
Started: 2025-03-21

Security
Networking & Firewalls | HTTPS | Denial Of Service (DoS) | Sanitization & Injection | Security Headers | Cross-Origin Resource Sharing (CORS) | Resource Isolation Policies | Cookies

Last update: 2025-10-06
Started: 2025-03-21

_server.yml for framework developers
The standard | The _server.yml file | The engine | The server | Recommendations for _server.yml engines | File paths | Options | Case study: plumber2 | YAML content | launch_server() | Supported frameworks

Last update: 2025-10-06
Started: 2025-10-06

Runtime
Execution Model | Environments | Performance & Request Processing | Managing State | In-Memory | File System | Cookies | External Data Store | Exit Handlers

Last update: 2025-09-22
Started: 2025-03-21

Introduction
Web APIs

Last update: 2025-09-05
Started: 2025-03-21

Programmatic Usage
Creating and Controlling routers | Defining handlers | Listening for and triggering events | Static File Routers

Last update: 2025-08-08
Started: 2025-03-21

Tips & Tricks
Debugging | Print Debugging | Router Stage Debugging | Interactive Debugging | Port Range

Last update: 2025-08-08
Started: 2025-03-21

Upgrading From Plumber
Moving from plumber | pr_*() to api_*() | Only path arguments are passed as named arguments to your handler | No more filter and preempt | forward replaced by Next and Break | New Request and Response objects | New Plumber object | Added @query and @body tags

Last update: 2025-05-21
Started: 2025-03-21

Readme and manuals

Help Manual

Help pageTopics
Add a tag extension to plumber2add_plumber2_tag
Create a new plumber API, optionally based on one or more plumber filesapi api_parse is_plumber_api
Add a new route to either the request or header routerapi_add_route
Serve resources from your file systemapi_assets api_statics
Add auth to an endpointapi_auth
Add an auth guard to your APIapi_auth_guard
Persistent server-side data storageapi_datastore
Configure your API for serving documentation for itselfapi_docs api_doc_add api_doc_setting
Set up a plumber2 api to act as a reverse proxyapi_forward
Set logging function and access log format for the APIapi_logger combined_log_format common_log_format logger_console logger_file logger_logger logger_null logger_otel logger_switch
Add a handler to a WebSocket messageapi_message
Add a handler to an eventapi_off api_on
Load up an API distributed with a packageapi_package
Redirect request to another resourceapi_redirect
Serve Quarto and Rmarkdown documents from a plumber2 apiapi_report
Add a handler for a requestapi_any api_connect api_delete api_get api_head api_options api_patch api_post api_put api_request_handlers api_trace
Add a handler for a request headerapi_any_header api_connect_header api_delete_header api_get_header api_head_header api_options_header api_patch_header api_post_header api_put_header api_request_header_handlers api_trace_header
Launch the APIapi_run api_stop
Set up CORS for a path in your plumber2 APIapi_security_cors
Add various security related headers to your plumber2 APIapi_security_headers
Set up resource isolation for a pathapi_security_resource_isolation
Turn on session cookie data storage for your APIapi_session_cookie
Serve a Shiny app from a plumber2 apiapi_shiny
Async evaluators provided by plumberasync_evaluators mirai_async
Create a _server.yml file to describe your APIcreate_server_yml
Retrieve options for creating a plumber2 apiall_opts get_opts
Router control flowBreak Next should_break
Construct OpenAPI specificationsopenapi openapi_contact openapi_content openapi_header openapi_info openapi_license openapi_operation openapi_parameter openapi_path openapi_request_body openapi_response openapi_schema openapi_tag
Parser functions provided by plumber2parsers parse_csv parse_feather parse_geojson parse_multipart parse_octet parse_parquet parse_rds parse_text parse_tsv parse_yaml
The Plumber2 ClassPlumber2
Register an async evaluatorget_async register_async show_registered_async
Register or fetch a parserget_parsers register_parser show_registered_parsers
Register or fetch a serializerget_serializers register_serializer show_registered_serializers
Serializer functions provided by plumber2format_bmp format_cat format_csv format_feather format_format format_geojson format_htmlwidget format_jpeg format_parquet format_pdf format_png format_print format_rds format_svg format_tiff format_tsv format_unboxed format_yaml serializers