A simple tool to publish websites to RStudio Connect
Project description
webconnect
A simple python package and command line tool to publish static websites to RStudio Connect.
This package is not affiliated with RStudio.
Command line tool
The primary way to use webconnect is via it's cli tiil, webconnectcli
.
THe cli tool requires 5 parameters.
- A path to a directory containing the static site to publish
- A unique name for the content on Connect - alphanumeric and underscores only
- A "pretty" name for the content that will be displayed in the Connect UI
- The URL for the Connect instance
- The Connect API key to use
usage: webconnectcli [-h] -d DIR -n NAME -p PRETTY -s SERVER -k KEY
optional arguments:
-h, --help show this help message and exit
-d DIR, --dir DIR name of the directory to publish
-n NAME, --name NAME name of the content - alphanumeric and underscores only
-p PRETTY, --pretty PRETTY
pretty name
-s SERVER, --server SERVER
RStudio Connect URL
-k KEY, --key KEY Connect API key
So a full example would look something like this:
webconnect \
-d path/to/site/content \
-n static_site \
-p "Example.org main site" \
-s https://connect.example.org \
-k ${CONNECT_API_KEY}
This relies on the Connect API key being available in the $CONNECT_API_KET
environment variable.
You could use the key directly if you prefer.
Package usage
import webconnect
webconnect.pub_rsconnect(
"path/to/site/content,
"static_site",
"Example.org main site",
"https://connect.example.org",
"hgjhghgjguytuyt6876uytgfhg",
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webconnect-0.0.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file webconnect-0.0.1.tar.gz
.
File metadata
- Download URL: webconnect-0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc0aa88301088b8fe733126c076ca585959ab0e3abb6871cd87b4695a03b448 |
|
MD5 | 9dc875b8f6c01129c2851df33123e9f1 |
|
BLAKE2b-256 | 6d60c835638ca5cfba6d4aba4996f8a45677daf0943d693c5260783536f2f72e |
File details
Details for the file webconnect-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: webconnect-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40058282c56085690fb4163fec93003ae8f5847c000d2e00f0a23e045883a7e0 |
|
MD5 | d612bbc7383f982a84a36651e7096c3f |
|
BLAKE2b-256 | 0b3b948954a9281f4bceaeb1f325fdc9b4e4df6ece10134b60a76e31d29f43fc |