Back to Templates

Streaming folder updates

View App View Code on GitHub
shiny create -m express \
  -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-folder
shiny create -m core \
  -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-folder

Monitor a folder for updates (e.g., adding a new file) and visualize the updates in real-time. To facilitate, this template makes a clever use of the watchfiles package and reactive file reading to trigger an update when the folder changes. To trigger a change, you can press the “+” icon to add a new file to the folder, which will then be displayed in the table (listing the files name and their last modification time). Additionally, when a file is selected in this table, the contents are displayed and available for download.

Layouts:

Packages:

  • faicons
  • pandas
  • watchfiles