|
| 1 | +# Shiny for Python |
| 2 | + |
| 3 | +[](https://pypi.org/project/shiny/) |
| 4 | +[](https://img.shields.io/github/actions/workflow/status/posit-dev/py-shiny/pytest.yaml?branch=main) |
| 5 | +[](https://anaconda.org/conda-forge/shiny) |
| 6 | +[](https://pypi.org/project/shiny/) |
| 7 | +[](https://github.com/posit-dev/py-shiny/blob/main/LICENSE) |
| 8 | + |
| 9 | +Shiny for Python is the best way to build fast, beautiful web applications in Python. You can build quickly with Shiny and create simple interactive visualizations and prototype applications in an afternoon. But unlike other frameworks targeted at data scientists, Shiny does not limit your app's growth. Shiny remains extensible enough to power large, mission-critical applications. |
| 10 | + |
| 11 | +To learn more about Shiny see the [Shiny for Python website](https://shiny.posit.co/py/). If you're new to the framework we recommend these resources: |
| 12 | + |
| 13 | +- How [Shiny is different](https://posit.co/blog/why-shiny-for-python/) from Dash and Streamlit. |
| 14 | + |
| 15 | +- How [reactive programming](https://shiny.posit.co/py/docs/reactive-programming.html) can help you build better applications. |
| 16 | + |
| 17 | +- How to [use modules](https://shiny.posit.co/py/docs/workflow-modules.html) to efficiently develop large applications. |
| 18 | + |
| 19 | +- Hosting applications for free on [shinyapps.io](https://shiny.posit.co/py/docs/deploy.html#deploy-to-shinyapps.io-cloud-hosting), [Hugging Face](https://shiny.posit.co/blog/posts/shiny-on-hugging-face/), or [Shinylive](https://shiny.posit.co/py/docs/shinylive.html). |
| 20 | + |
| 21 | +## Join the conversation |
| 22 | + |
| 23 | +If you have questions about Shiny for Python, or want to help us decide what to work on next, [join us on Discord](https://discord.gg/yMGCamUMnS). |
| 24 | + |
| 25 | +## Getting started |
| 26 | + |
| 27 | +To get started with shiny follow the [installation instructions](https://shiny.posit.co/py/docs/install-create-run.html) or just install it from pip. |
| 28 | + |
| 29 | +```sh |
| 30 | +pip install shiny |
| 31 | +``` |
| 32 | + |
| 33 | +To install the latest development version: |
| 34 | + |
| 35 | +```sh |
| 36 | +# First install htmltools, then shiny |
| 37 | +pip install git+https://github.com/posit-dev/py-htmltools.git#egg=htmltools |
| 38 | +pip install git+https://github.com/posit-dev/py-shiny.git#egg=shiny |
| 39 | +``` |
| 40 | + |
| 41 | +You can create and run your first application with `shiny create`, the CLI will ask you which template you would like to use. You can either run the app with the Shiny extension, or call `shiny run app.py --reload --launch-browser`. |
| 42 | + |
| 43 | +## Development |
| 44 | + |
| 45 | +* Shinylive built from the `main` branch: https://posit-dev.github.io/py-shiny/shinylive/py/examples/ |
| 46 | +* API documentation for the `main` branch: |
| 47 | + * https://posit-dev.github.io/py-shiny/docs/api/express/ |
| 48 | + * https://posit-dev.github.io/py-shiny/docs/api/core/ |
| 49 | + |
| 50 | +If you want to do development on Shiny for Python: |
| 51 | + |
| 52 | +```sh |
| 53 | +pip install -e ".[dev,test]" |
| 54 | +``` |
| 55 | + |
| 56 | +Additionally, you can install pre-commit hooks which will automatically reformat and lint the code when you make a commit: |
| 57 | + |
| 58 | +```sh |
| 59 | +pre-commit install |
| 60 | + |
| 61 | +# To disable: |
| 62 | +# pre-commit uninstall |
| 63 | +``` |
0 commit comments