All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The
https_proxyenvironment variable is recognized as a synonym forHTTPS_PROXY. - Common environment directories (
env, venv, .env, .venv) are no longer excluded by name. Environments are detected by the presence of a python executable inbinorScriptsand excluded.
- Added support for the
no_proxyorNO_PROXYenvironment variables to specify hosts that should not be accessed via proxy server. It's a comma-separated list of host or domain suffixes. For example, specifyingexample.comwill bypass the proxy for example.com, host.example.com, etc. - If an entrypoint is not specified with
--entrypoint, rsconnect-python will try harder than before to choose an entrypoint file. In addition to the previously recognized filename patterns, the file patternsapp-*.py,app_*.py,*-app.py, and*_app.pyare now considered. However, if the directory contains more than one file matching these new patterns, you must provide rsconnect-python with an explicit--entrypointargument. - Added support for deploying directly from remote git repositories. Only Connect server targets are supported, and the Connect server must have git configured with access to your git repositories. See the Connect administrator guide and Connect user guide for details.
- Python virtualenvs are now detected in Windows environments, and are automatically excluded from the uploaded bundle.
- Error deploying to shinyapps.io when
--app-idis provided #464.
- Add
--disable-env-management,--disable-env-management-pyand--disable-env-management-rflags for all content types that support environment restores. These flags indicate to Connect that the user is responsible for Python/R package installation, and Connect should not install packages during the build. The Python/R packages must still be available in the runtime environment in order to run the content. This is especially useful if off-host execution is enabled when the execution environment (specified by--image) already contains the required packages. Requires Posit Connect>=2023.07.0.
- Failed deploys to shinyapps.io will now output build logs. Posit Cloud application deploys will also output build logs once supported server-side.
- Redeploy to Posit Cloud from a project now correctly associates the content with that project.
- The
CONNECT_TASK_TIMEOUTenvironment variable, which configures the timeout for task based operations. This value translates into seconds (e.g.,CONNECT_TASK_TIMEOUT=60is equivalent to 60 seconds.) By default, this value is set to 86,400 seconds (e.g., 24 hours). - Deploys for Posit Cloud now support Quarto source files or projects with
markdownorjupyterengines.
- Deploys for Posit Cloud and shinyapps.io now accept the
--visibilityflag.
- Removes redundant client-side compatibility checks in favor of server-side compatibility checks when deploying Python content. Note that the error handling may differ between versions of Connect. See Connect release notes for additional details regarding compatibility.
- Shiny app deployment fails when static content is present in the app #373.
-
deploy htmlanddeploy manifestnow support deployment to Posit Cloud. -
Added
system caches listandsystem caches deletecommands which allow administrators to enumerate and delete R and Python runtime caches from Connect servers #384. Read more about the feature in our docs.
- Cloud deployments accept the content id instead of application id in the --app-id field.
- The
app_idfield in application store files also stores the content id instead of the application id. - Application store files include a
versionfield, set to 1 for this release.
- cacert read error when adding/updating a server #403.
- getdefaultlocale no longer work with newer versions of Python #397 #399.
- extra files not being included in write-manifest #416.
- The
CONNECT_REQUEST_TIMEOUTenvironment variable, which configures the request timeout for all blocking HTTP and HTTPS operations. This value translates into seconds (e.g.,CONNECT_REQUEST_TIMEOUT=60is equivalent to 60 seconds.) By default, this value is 300.
-
Extra files were not being included in deploy Voila.
-
Error message to indicate the Python also has to be configured in Connect.
- Added
deploy voilacommand to deploy Jupyter Voila notebooks. See the user documentation for more information.
deploy htmlwas refactored. Its behavior is described below.
Specifying a directory in the path will result in that entire directory*, subdirectories, and sub contents included in the deploy bundle. The entire directory is included whether or not an entrypoint was supplied
e.g. using the following directory,
├─ my_project/
│ ├─ index.html
│ ├─ second.html
and the following command:
rsconnect deploy html -n local my_project
or this command:
rsconnect deploy html -n local my_project -e my_project/index.html
we will have a bundle which includes both index.html and second.html
- specifying a file in the path will result in that file* - not the entire directory - included in the deploy bundle
e.g. using the following directory,
├─ my_project/
│ ├─ index.html
│ ├─ second.html
and the following command:
rsconnect deploy html -n local my_project/second.html
we will have a bundle which includes second.html
-
a note regarding entrypiont
- providing an entrypoint is optional if there's an
index.htmlinside the project directory, or if there's a single html file in the project directory. - if there are multiple html files in the project directory and it contains no
index.html, we will get an exception when deploying that directory unless an entrypoint is specified.
- providing an entrypoint is optional if there's an
-
if we want to specify an entrypint, and we are executing the deploy command outside a project folder, we must specify the full path of the entrypoint:
rsconnect deploy html -n local my_project -e my_project/second.html
- if we want to specify an entrypint, and we are executing the deploy command inside the project folder, we can abbreviate the entrypoint, like so:
cd my_project
rsconnect deploy html -n local ./ -e second.html
*Plus the manifest & other necessary files needed for the bundle to work on Connect.
- Extra files were not being included in certain deploy and write-manifest commands.
- The
--cacertoption now supports certificate files encoded in the Distinguished Encoding Rules (DER) binary format. Certificate files with DER encoding must end in a.ceror.dersuffix. - The
--pythonoption now provides additional user guidance when an invalid path is provided.
- The
--cacertoption now requires that Privacy Enhanced Mail (PEM) formatted certificate files end in a.ca-bundle,.crt,.key, or.pemsuffix.
- You can now redeploy to a content with an "unknown" app mode. A content item's app mode is "unknown" if it was created, but never deployed to, or its deployment failed before an app mode could be determined.
-
Python 3.5 & 3.6 support.
-
rsconnect-pythonno longer considers theRETICULATE_PYTHONenvironment variable. In environments whereRETICULATE_PYTHONis set outside a project context (e.g. by a Posit Workbench administrator), attempting to deploy content or write manifests in projects using virtual environments required explicitly setting--python /path/to/virtualenv/python. RemovingRETICULATE_PYTHONdetection should simplify the use of the CLI in this case.
- When running rsconnect bootstrap, you can now specify the jwt secret using the CONNECT_BOOTSTRAP_SECRETKEY environment variable.
-
Update pip_freeze to use
pip freezesince Connect filters for valid package paths in the backend and it no longer depends on the undocumented behavior ofpip list --format=freeze. This reverts the change made in 1.5.2. -
Renamed the deploy_html
excludesflag toexcludefor consistency with other deploy commands.
- Updated actions.py to reuse code in main, minus the CLI parts. As a result deploy_jupyter_notebook and deploy_by_manifest had their return signatures changed. They now return None.
- You can now use the new rsconnect bootstrap command to programmatically provision an initial administrator api key on a fresh Connect instance. This requires RStudio Connect release 2022.10.0 or later and Python version >= 3.6.
- Add support for deployment on RStudio Cloud
- rsconnect-python will now issue warnings if it detects environmental variables that overlap with stored credentials
- You can now deploy Shiny for Python applications with
deploy shiny - In addition to deploying to Connect, you can now deploy to shinyapps.io with
deploy shinyordeploy manifest - The
addoption now supports shinyapps.io credentials.
- You can now deploy Quarto documents in addition to Quarto projects. This
requires RStudio Connect release 2021.08.0 or later. Use
rsconnect deploy quartoto deploy, orrsconnect write-manifest quartoto create a manifest file.
- As a prelude to setting and documenting rsconnect-python APIs, various functions in
actionshave been moved tobundle, or replaced with RSConnectExecutor. The moved functions now include a deprecation warning, and will be fully deprecated in a future release.
Corrected changelog heading.
-
You can now set environment variables for the deployed content with the
-Eoption. These will be passed to RStudio Connect during the deployment process, so they are available in your code whenever it runs within RStudio Connect. Requires RStudio Connect version 1.8.6 or later. -
You can now deploy Quarto projects. This requires RStudio Connect release 2021.08.0 or later. Use
rsconnect deploy quartoto deploy, orrsconnect write-manifest quartoto create a manifest file. -
An
imagecommand line option has been added to thewrite-manifestanddeploycommands to specify the target image to be used on the RStudio Connect server during content execution. This is only supported for theapi,bokeh,dash,fastapi,notebook,quartoandstreamlitsub-commands. It is only applicable if the RStudio Connect server is configured to use off-host execution. -
You can now deploy static content such as html and its associated assets with
rsconnect deploy html.
- Publish supported python versions announcement.
- Adds
rsconnect contentsubcommands for interacting with RStudio Connect's/v1/contentREST API. This allows users to search, download, and (re)build content. Users should note that thersconnect content buildsubcommand requires RStudio Connect release 2021.11.1 or later.
- Support for Python 2.7 has been removed in this release.
- You can now deploy FastAPI applications. This requires RStudio Connect release 2021.08.0
or later. Use
rsconnect deploy fastapito deploy, orrsconnect write-manifest fastapito create a manifest file. - In addition to FastAPI, you can also deploy Quart, Sanic, and Falcon ASGI applications.
- rsconnect-python will now issue a warning during deployment if there isn't a requirements.txt file in the deployment directory. Using a requirements file ensures consistency in the environment that will be created by the RStudio Connect server during deployment. This helps avoid unnecessary package installations and issues that can occur if rsconnect-python falls back to inferring packages from the local Python environment.
-
If an entrypoint is not specified with
--entrypoint, rsconnect-python will attempt to choose an entrypoint file. It looks for common names (app.py,application.py,main.py,api.py). If there is a single python source file in the directory, that will be used as the entrypoint. rsconnect-python does not inspect the file contents to identify the object name, which must be one of the default names that Connect expects (app,application,create_app, ormake_app). -
Ability to hide code cells when rendering Jupyter notebooks.
After setting up Connect (>=1.9.0) and rsconnect-python, the user can render a Jupyter notebook without its corresponding code cells by passing the ' hide-all-input' flag through the rsconnect cli:
rsconnect deploy notebook \
--server https://connect.example.org:3939 \
--api-key my-api-key \
--hide-all-input \
mynotebook.ipynb
To selectively hide the input of cells, the user can add a tag call 'hide_input' to the cell, then pass the ' hide-tagged-input' flag through the rsconnect cli:
rsconnect deploy notebook \
--server https://connect.example.org:3939 \
--api-key my-api-key \
--hide-tagged-input \
mynotebook.ipynb
- Support for generating md5 file upload checksums, even if Python's
hashlibwas configured for FIPS mode. The fallback uses theusedforsecurityoption which is available in Python 3.9 and later.
- support for HTTPS_PROXY
- Environments are now introspected with
pip list --format=freezeinstead ofpip freeze, since the latter injects nonexistent paths into the requirements file when run in a conda environment. This issue started occurring when pip 20.1 added support for PEP 610 metadata. - Conda environments contain Conda-only versions of setuptools, which are now filtered out from requirements.txt for non-Conda environments.
- Python 2 encoding error when using rsconnect-jupyter to publish a notebook containing binary data.
- Preserve more details when raising exceptions.
1.5.0 - 2020-07-10
- support for deploying Streamlit and Bokeh applications
- improved handling of HTTP timeouts
- CI verification on macos with python3.8
- trigger rsconnect-jupyter workflow on successful pushes to main branch
- default exclusion list to include common virtual environment directory names (
env,venv,.env, and.venv) - environment internally represented as data class instead of dict
- replace all internal "compatibility mode" references with "conda mode"
- CI moved to GitHub Actions
- generation and publishing of
sdistartifact
- explicitly set the
--to-htmloption tonbconvertwhen publishing a static notebook, as required by the latest version ofnbconvert
1.4.5 - 2020-04-10
- provide clearer feedback when errors happen while building bundles from a manifest
- pin required versions of the
clickandsixlibraries that we use - help text touch up
- output alignment under Python 2
1.4.4 - 2020-04-02
- converted a traceback to a more appropriate message
- updated
CookieJarclass to support marshalling/un-marshalling to/from a dictionary
- an issue with cookie jar continuity across connections
1.4.3 - 2020-04-01
- being more distinguishing between a server that's not running Connect and a credentials problem
1.4.2 - 2020-03-27
- more helpful feedback when a "requested object does not exist" error is returned by Connect
- be more distinguishing between a server that's not running Connect and a credentials problem
- an issue where cookie header size could grow inappropriately (#107)
- corrected the instructions to enable auto-completion
1.4.1 - 2020-03-26
- sticky sessions so we will track deploys correctly when RStudio Connect is in an HA/clustered environment
1.4.0 - 2020-03-16
- functions in
actionsthat provide the same functionality as the CLI
- command line handling of options is more consistent across all commands
testcommand replaced with a more broadly functionaldetailscommand- errors handled much more consistently and are more informative
- CLI output is more clean
- overall code has been refactored and improved for clarity, testability and stability
- all CLI help has been improved for consistency, correctness and completeness
- many documentation improvements in content and appearance
1.3.0 - 2020-01-07
- first release