Skip to content

Commit bad6e0d

Browse files
author
Stefan Küthe
committed
Merge branch 'feature/app-from-template' into 'main'
Add template example See merge request insertnamehere/shiny/shiny-for-python-getting-started!1
2 parents b06de27 + 4041e1e commit bad6e0d

File tree

7 files changed

+663
-3
lines changed

7 files changed

+663
-3
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ shiny create -d basic_app -t basic-app -m express
2525
shiny run basic_app/app.py
2626
```
2727

28-
## Templates
28+
## Use templates from GitHub
2929

3030
* [posit-dev/py-shiny-templates](https://github.com/posit-dev/py-shiny-templates)
3131

32+
```bash
33+
shiny create -g posit-dev/py-shiny-templates -t map-distance
34+
```
35+
3236
## Deployment
3337

3438
To run Shiny apps in production you should use `gunicorn` or `uvicorn`:

app_from_gh_template/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
map-distance/
2+

app_from_gh_template/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# App from github template
2+
3+
```bash
4+
uv init
5+
6+
uv add shiny
7+
8+
shiny create -g posit-dev/py-shiny-templates -t map-distance
9+
10+
shiny run map-distance/app.py
11+
```

app_from_gh_template/hello.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def main():
2+
print("Hello from app-from-gh-template!")
3+
4+
5+
if __name__ == "__main__":
6+
main()

app_from_gh_template/pyproject.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[project]
2+
name = "app-from-gh-template"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.9"
7+
dependencies = [
8+
"faicons>=0.2.2",
9+
"geopy>=2.4.1",
10+
"ipyleaflet>=0.19.2",
11+
"requests>=2.32.3",
12+
"shiny>=1.2.1",
13+
"shinywidgets>=0.5.1",
14+
]

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ dependencies = [
1111
]
1212

1313
[tool.uv.workspace]
14-
members = ["routes_example_app", "shinylive_quarto", "shinylive_without_quarto"]
14+
members = ["routes_example_app", "shinylive_quarto", "shinylive_without_quarto", "app_from_gh_template"]

uv.lock

+624-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)