-
Notifications
You must be signed in to change notification settings - Fork 0
/
getting-started.qmd
84 lines (60 loc) · 2.08 KB
/
getting-started.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
title: Getting Started
format: html
filters:
- holoviz/quarto
---
This guide will explain how to get started with [Quarto](https://quarto.org/) for Python and the `holoviz-quarto` extension.
## Installing Quarto
You can install everything you need with Conda
```bash
conda create -n holoviz-quarto -c conda-forge python=3.11 r-quarto perl jupyter panel hvplot matplotlib
```
This will
- Create a Python environment named `holoviz-quarto`.
- Install Quarto and its dependencies perl and jupyter
- Install `panel` and other Python packages
For alternative installation methods check out the [Quarto Getting Started Guide](https://quarto.org/docs/get-started/).
## Installing the `holoviz-quarto` extension
::: {.callout-note}
You can use HoloViz with Quarto without this extension. If you install the extension you will get additional features. Currently the `{panel-convert-python}` filter.
:::
You can install the `holoviz-quarto` extension in your Quarto project via
```bash
quarto add awesome-panel/holoviz-quarto
```
This will install the extension under the `_extensions` subdirectory. If you're using version control, you will want to check in this directory.
Now put this in the header of your document, or in the `_quarto.yml` file:
```yaml
filters:
- holoviz/quarto
```
An example document is shown below.
````markdown
---
title: Panel in Quarto Examples
format: html
filters:
- holoviz/quarto
---
This is a Panel application embedded in a Quarto doc.
```{panel-convert-python}
import panel as pn
pn.extension(design="material")
slider = pn.widgets.IntSlider(name="Select a value", value=10, start=0, end=100)
pn.Column(
"# Hello Panel + Quarto!",
pn.rx("You selected: {}").format(slider),
).servable()
```
````
```{panel-convert-python}
import panel as pn
pn.extension(design="material")
slider = pn.widgets.IntSlider(name="Select a value", value=10, start=0, end=100)
pn.Column(
"# Hello Panel + Quarto!",
pn.rx("You selected: {}").format(slider),
).servable()
```
The above component is an entire Panel application running live and interactively powered by Pyodide.