https://github.com/bergam0t/quarto_streamlit_community_cloud
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
https://github.com/bergam0t/quarto_streamlit_community_cloud
quarto streamlit streamlit-cloud
Last synced: about 1 month ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/bergam0t/quarto_streamlit_community_cloud
- Owner: Bergam0t
- License: mit
- Created: 2024-12-03T16:42:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T17:30:37.000Z (over 1 year ago)
- Last Synced: 2025-03-27T07:13:41.857Z (about 1 year ago)
- Topics: quarto, streamlit, streamlit-cloud
- Language: Python
- Homepage: https://quarto-community-cloud.streamlit.app/
- Size: 337 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](https://github.com/Bergam0t/Project_Toy_MECC) - 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](https://github.com/DomRowney), Luke Herbert and Sam Vautier for their work on generating a Quarto report for the [Toy MECC app](https://github.com/DomRowney/Project_Toy_MECC).
## 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)