Skip to content

An example repository demonstrating how Quarto could be installed on Streamlit community cloud, allowing you to generate and download Quarto reports from your hosted Streamlit app

License

Notifications You must be signed in to change notification settings

Bergam0t/quarto_streamlit_community_cloud

Repository files navigation

Repository demonstrating how Quarto can be installed on a Streamlit community cloud instance and used for generation of downloadable reports based on inputs or things that run on the community cloud.

Based off work done here - the commit history of this repo may prove useful if trying to refactor or alter approach as there is a lot there about what didn't work.

Code for generation of a Quarto report by first saving user inputs to a JSON: credit to Dom Rowney, Luke Herbert and Sam Vautier for their work on generating a Quarto report for the Toy MECC app.

Key learnings from this process

  • quarto/quarto-cli not available as standard package so unable to install via adding to packages.txt

  • as we don't have admin rights on streamlit community cloud server, we can't download the deb package and install with sudo dpkg -i (and running without sudo fails)

  • by installing wget in packages.txt we can then download the quarto tarball and unzip that - but need to ensure it is either extracted to someone on PATH, or its location is added to PATH, so it is found

Other notes

Key parts of process are

  • adding wget to packages.txt
  • using the get_quarto function defined in app.py (with streamlit caching so that it doesn't try to run it on every page load as it's quite slow!)

If you use

if platform.processor() == '':
    get_quarto("quarto_streamlit_community_cloud") # This name must match the repository name on GitHub

Then it will only try and download quarto if it's running on community cloud as opposed to your local machine.

When you are using/testing on your local machine, it should find and use Quarto if it's part of your PATH - I haven't tested that with anything non-Windows (seem to recall you're on mac?) but I think the principle should be broadly the same across OSs.

I haven't tested it on anything newer than streamlit 1.37 but hopefully still works with newer versions - and the sample app I put up at the time still seems to be working correctly on community cloud so they don't seem to have blocked any of the workarounds I used... (as of 12/5/25)

About

An example repository demonstrating how Quarto could be installed on Streamlit community cloud, allowing you to generate and download Quarto reports from your hosted Streamlit app

Topics

Resources

License

Stars

Watchers

Forks