Package 'kwb.python'

Title: R Package with Functions for Working with Python
Description: R Package with functions for working with Python by enhancing the use of R package [reticulate](https://github.com/rstudio/reticulate).
Authors: Michael Rustler [aut, cre] (ORCID: <https://orcid.org/0000-0003-0647-7726>), DWC [fnd], KEYS [fnd], Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph]
Maintainer: Michael Rustler <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-05-26 10:15:16 UTC
Source: https://github.com/KWB-R/kwb.python

Help Index


conda_export

Description

conda_export

Usage

conda_export(condaenv, export_dir = tempdir())

Arguments

condaenv

name or path of conda environment to export

export_dir

export directory (default: tempdir())

Value

creates export_dir/environment_condaenv.yml and returns path


conda_py_install

Description

combined installation of conda/py packages in one call

Usage

conda_py_install(env_name, pkgs = list(conda = "python", py = NULL), ...)

Arguments

env_name

name of conda environment

pkgs

named list of conda/py packages to install (default: list(conda = "python", py = NULL))

...

additional arguments passed to install_miniconda

Value

creates conda environment and returns path


install_miniconda

Description

install_miniconda

Usage

install_miniconda(
  path = reticulate::miniconda_path(),
  update = TRUE,
  force = FALSE
)

Arguments

path

The path in which Miniconda will be installed. Note that the installer does not support paths containing spaces. See miniconda_path for more details on the default path used by reticulate.

update

Boolean; update to the latest version of Miniconda after install? (default: TRUE)

force

Boolean; force re-installation if Miniconda is already installed at the requested path? (default: FALSE)

Value

installs Miniconda at requested path (or skips in case already installed, where reticulate would otherwise throw an error!)


run_django

Description

run_django

Usage

run_django(condaenv, cmd = "runserver", path_manage.py = "tools/manage.py")

Arguments

condaenv

name/path of conda environment with Django app

cmd

command (default: "runserver")

path_manage.py

relative/absolute path to "manage.py" (default: tools/manage.py")

Value

runs Django command and opens webbrowser (if cmd == "runserver")