[Python] Building a streamlit app that can be run simply with "uvx [package-name]"

Discussão em 'Python' iniciado por Stack, Novembro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to write a python package (let's call it foobarbaz) that would have script (e.g., pointing to foobarbaz:main) which would itself launch/serve a streamlit app. The ultimate goal is to let end-users simply run uvx foobarbaz and access the streamilt app.

    1. What minimal project structure would allow me to do this? Something like this?

    foobarbaz
    ├── pyproject.toml
    └── src
    └── foobarbaz
    └── __init__.py


    1. How can I programatically trigger the equivalent of streamlit run foobarbaz/__init__.py from within foobarbaz.main()? Is this possible in a truly cross-platform way?


    2. How can I test locally that everything works as intended before publishing to PIPy?

    Continue reading...

Compartilhe esta Página