rgear - Generate R helper files
The aim of rgear is to provide simple tooling to create helper files for R based content.
The files it creates allow you to serve R based content (Shiny apps, plumber APIs or RMarkdown html outputs) from the command line.
Originally created for use with Domino Data Lab, rgear can be used wherever R is and therefore also makes a great complement to other projects such as (R4Pi)[https://r4pi.org].
Supported content types:
- Shiny apps
- Rmarkdown html output
- Plumber APIs
Installation
rgear is written in Python, and can be installed directly from PyPI:
# python3 -m pip install rgear
Usage
rgear --help
usage: rgear [-h] [-f] [-p PORT] [-v] [--version]
{shiny,plumber,rmarkdown} path
Generates helper scripts for starting R based content servers
positional arguments:
{shiny,plumber,rmarkdown}
choose the application type you want to serve
path path to the content to serve
optional arguments:
-h, --help show this help message and exit
-f, --force force overwrite if the output file(s) already exist
-p PORT, --port PORT override the default port setting. [default: 8888]
-v, --verbose enable verbose output
--version print the version and exit
For detailed help, please see https://github.com/sellorm/rgear
Using the above options, various files -- mostly app.sh -- will be written to the working directory with the required parameters already populated.
The app.sh file created by rgear can be used to start the specified content from the command line. This makes it an ideal complement to all command-line uses of R.
For example, to generate a script to serve a plumber API:
# rgear plumber plumber.R
Using with Domino Data Lab
Domino Data Lab can then use these files to serve your content as a DDL "(app)[https://docs.dominodatalab.com/en/latest/user_guide/71635d/publish-apps/]".
The "app.sh" files created by rgear have sensible defaults for Domino and allows users to generate the file(s) they need without too much effort.
Use rgear to generate the "app.sh" file you need for your specific content type and then configure Domino to use that file to serve your content.
Using with command line R (Including R4Pi)
Use rgear to generate startup scripts for your Shiny apps, plumber APIs or RMarkdown reports.
For example, if you have a Shiny app in an "app.R" file, run:
# rgear shiny app.R
Then you can run the app with:
# ./app.sh
Then visit the app in your browser using either http://localhost:8888 or http://:8888.
Use ctrl+c to stop the app from running.
You can run the "app.sh" script in the background with:
# nohup ./app.sh &
You'll need to use ps and kill to stop an application started this way.
License
MIT License Copyright (c) 2023 Mark Sellors
See the LICENSE file for the full text of the license.
Metadata
Release files for rgear 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rgear-0.2.0.tar.gz | 4.4 kB | Without provenance | Details for rgear-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rgear-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rgear-0.2.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / rgear-0.2.0.tar.gz
| Download URL | rgear-0.2.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2ef4268a076340e8b682ceaa985643f12617e44f83ce16459e374a4ed00e1b4
|
|
BLAKE2b-256 checksum How to use checksums |
0c524479dd6d05b0b3923d40cc68917df9fdbc2bd1d3783695db4e612fc4eb20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.2 Linux/5.15.84-v7l+
|
Release files / rgear-0.2.0-py3-none-any.whl
| Download URL | rgear-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ff35f84ec964f019a8becf6ec43bf031cb5dd487c13499df91dfea0c9cdc9ae
|
|
BLAKE2b-256 checksum How to use checksums |
e51a6bcbb5d3da12c38bd317e437f956ecc903622944fcbefd38a6a594193500
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.2 Linux/5.15.84-v7l+
|
Security for rgear 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.