Skip to content

Installing letitishine

In its current version, letitshine is not yet available as a package though PyPi. If you just want to use the command line utitility letitshine the easiest way is to install it with pipx, but if you want to install optional dependencies, run the examples, etc..., you can use the standard pip install.

We recommend that you use a virtual environment to install and run letitshine. Since this is a package aimed at developing your own Shiny apps from existing Python functions, it is convenient to use the same virtual environment for managing the letitshine install that you use for developing. If you do not know what is a virtual environment (as I did until quite recently...), take the time to learn about them and how to create because it is important. In any case, the package itself only needs a standard simple package called docstring_parser [https://pypi.org/project/docstring-parser] and does not need any other package apart from the Python standard library.

Installation using pipx

Clone the repository and, assuming pipx is installed, run

git clone https://codeberg.org/joaquimpuig/python-letitshine.git # clone the repository
pipx install ./python-letitshine

and, if you have not done it before, run

pipx ensurepath

to ensure that the letitishine app is in the correct path.

Installation through pip

The package letitshine and its commandline untility can be installed through pip for your virtual environment. If you just want to write the Shiny apps without running them, you do not need to install the optional dependencies

To install the letitshine package call

pip install -e "python-letitshine" #CHANGE for the packaged version removing -e

If you want to install the optional dependencies for better previewing of docstrings install

pip install -e "python-letitshine[extra]" #CHANGE for the packaged version removing -e

on a terminal. If you want to run shiny apps (assuimg that the python functions have the import libraries installed in the current python environment), you will need to install the shiny dependences

pip install -e "python-letitshine[shiny]" #CHANGE for the packaged version removing -e

To run and test the examples in the examples/ directory you will need to install the optional dependencies, which are common packages for math computations:

pip install -e "python-letitshine[examples]" #CHANGE for the packaged version removing -e

Running the tests

Running the examples

Once the letitishine command line utility is installed, you can now run the examples included in the package. For your convenience, the create_examples.sh script in the examples directory creates the Python Shiny apps from the directory and moves them to the app directory. You can learn the differnt command line options in the User Guide.