8000 Migrate user guide to how-to guides by philippjfr · Pull Request #4251 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add integrations section
  • Loading branch information
philippjfr committed Jan 5, 2023
commit 32bf2ba71b81b38bc71abc1d536e1890fb9929b7
2 changes: 1 addition & 1 deletion doc/how_to/deployment/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ You also need to configure your app service **general settings** to
- allow `Web sockets` and
- be `Always on`

<img src="../_static/azure_deployment.png" style="width:67%"></img>
<img src="../../_static/azure_deployment.png" style="width:67%"></img>

If you would like to setup **automated CI/ CD** via Azure DevOps, Azure Pipelines and Docker to a Web App for Containers, you can find a good starting point in the [devops Folder](https://github.com/MarcSkovMadsen/awesome-panel/tree/master/devops) of [awesome-panel.org](https://awesome-panel.org).
14 changes: 13 additions & 1 deletion doc/how_to/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Panel is built on top of Bokeh, which provides a powerful [Tornado](https://www.

For guides on running and configuring a Panel server see the [server how-to guides](../server/index).

::::{grid} 1 2 2 3
::::{grid} 2 3 3 5
:gutter: 1 1 1 2

:::{grid-item-card} Azure
Expand Down Expand Up @@ -37,3 +37,15 @@ For guides on running and configuring a Panel server see the [server how-to guid
#### Other Cloud Providers

Panel can be used with just about any cloud provider that can launch a Python process, including Amazon Web Services (AWS) and DigitalOcean. The Panel developers will add documentation for these services as they encounter them in their own work, but we would greatly appreciate step-by-step instructions from users working on each of these systems.

```{toctree}
:titlesonly:
:hidden:
:maxdepth: 2

azure
binder
gcp
heroku
huggingface
```
25 changes: 18 additions & 7 deletions doc/how_to/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,49 @@

The Panel's How to Guides provide step by step recipes for solving essential problems and tasks. They are more advanced than the Getting Started material and assume some knowledge of how Panel works.

## Running and Configuring a Panel Server
## Configuring a Panel Server

## Deployment

The deployment guides provide step-by-step instructions on deploying Panel applications to various cloud providers.

::::{grid} 1 2 2 3
::::{grid} 2 3 3 5
:gutter: 1 1 1 2

:::{grid-item-card} Azure
:link: how_to/azure
:link: deployment/azure
:link-type: doc
:::

:::{grid-item-card} Binder
:link: how_to/binder
:link: deployment/binder
:link-type: doc
:::

:::{grid-item-card} Google Cloud
:link: how_to/gcp
:link: deployment/gcp
:link-type: doc
:::

:::{grid-item-card} Heroku
:link: how_to/heroku
:link: deployment/heroku
:link-type: doc
:::

:::{grid-item-card} Hugging Face
:link: how_to/huggingface
:link: deployment/huggingface
:link-type: doc
:::

::::


```{toctree}
:titlesonly:
:hidden:
:maxdepth: 2

server/index
integrations/index
deployment/index
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Django
# Running Panel apps inside Django

Panel generally runs on the Bokeh server which itself runs on Tornado. However, it is also often useful to embed a Panel app in large web application, such as a Django web server. Using Panel with Django requires a bit more work than for notebooks and Bokeh servers.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FastAPI
# Integrating Panel with FastAPI

Panel generally runs on the Bokeh server which itself runs on Tornado. However, it is also often useful to embed a Panel app in large web application, such as a FastAPI web server. [FastAPI](https://fastapi.tiangolo.com/) is especially useful compared to others like Flask and Django because of it's lightning fast, lightweight framework. Using Panel with FastAPI requires a bit more work than for notebooks and Bokeh servers.

Expand All @@ -11,7 +11,7 @@ Before we start adding a bokeh app to our FastApi server we have to set up some
You'll need to create a file called `examples/apps/fastApi/main.py`.

In `main.py` you'll need to import the following( which should all be already available from the above conda installs):

i
```python
import panel as pn
from bokeh.embed import server_document
Expand Down
3 changes: 3 additions & 0 deletions doc/how_to/integrations/flask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Integrating Panel with Flask

WIP
33 changes: 33 additions & 0 deletions doc/how_to/integrations/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Server Integrations

These guides will cover how to integrate Panel applications with various external frameworks such as Django, FastAPI and Flask.

::::{grid} 2 3 3 5
:gutter: 1 1 1 2

:::{grid-item-card} Flask
:link: flask
:link-type: doc
:::

:::{grid-item-card} FastAPI
:link: FastAPI
:link-type: doc
:::

:::{grid-item-card} Django
:link: django
:link-type: doc
:::

::::

```{toctree}
:titlesonly:
:hidden:
:maxdepth: 2

flask
FastAPI
django
```
43 changes: 34 additions & 9 deletions doc/how_to/server/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Running and configuring a Panel server
# Configuring a Panel server

The Panel server can be launched either from the commandline (using `panel serve`) or programmatically (using `panel.serve()`). In this guide we will discover how to run and configure server instances using these two options.

Expand All @@ -15,34 +15,59 @@ If you do not want to maintain your own web server and/or set up complex reverse
::::{grid} 1 2 2 3
:gutter: 1 1 1 2

:::{grid-item-card} Launch Panel server from the commandline
:::{grid-item-card} {octicon}`terminal;2.5em;sd-mr-1` Launch from the commandline
:link: commandline
:link-type: doc

Launch and configure a Panel application from the commandline.
:::

:::{grid-item-card} Launch Panel server programmatically
:::{grid-item-card} {octicon}`code-square;2.5em;sd-mr-1` Launch programmatically
:link: programmatic
:link-type: doc

Launch and configure a Panel application programmatically.
:::

:::{grid-item-card} Serving multiple applications
:::{grid-item-card} {octicon}`stack;2.5em;sd-mr-1` Serving multiple applications
:link: multiple
:link-type: doc

Discover how-to launch and configure multiple applications on the same server.
:::

:::{grid-item-card} Accessing a deployment over SSH
:link: ssh
:::{grid-item-card} {octicon}`server;2.5em;sd-mr-1` Setting up a (reverse) proxy
:link: proxy
:link-type: doc

Discover how-to configure a reverse proxy to scale your deployment.
:::

:::{grid-item-card} Setting up a (reverse) proxy
:link: proxy
:::{grid-item-card} {octicon}`chevron-right;2.5em;sd-mr-1` Access via SSH
:link: ssh
:link-type: doc

Discover how to access a Panel deployment running remotely via SSH.
:::

:::{grid-item-card} Serving static files
:::{grid-item-card} {octicon}`file-media;2.5em;sd-mr-1` Serving static files
:link: static_files
:link-type: doc

Discover how to serve static files alongside your Panel application(s).
:::

::::

```{toctree}
:titlesonly:
:hidden:
:maxdepth: 2

commandline
programmatic
multiple
ssh
proxy
static_files
```
1 change: 1 addition & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ alt: Blackstone Logo

self
getting_started/index.md
how_to/index.md
user_guide/index.rst
gallery/index.rst
reference/index.rst
Expand Down
0