Beta: Please note that Dash support is a beta feature which is still undergoing final testing before its official release. Should you encounter any bugs, glitches, lack of functionality or other problems, please let us know so we can improve before public release.




Example apps

An example Dash app is available on GitHub.

To deploy the example with rsconnect-python:

git clone https://github.com/sol-eng/python-examples

There are also a number of Dash example apps available from Plotly. Some of them require Python 2 and others use Python 3; please ensure that you run them locally before deploying to Connect. Also ensure that you specify the correct entrypoint for the specific app you are deploying.

git clone https://github.com/plotly/dash-sample-apps

User meta-data

Dash apps can access the username and groups of the current logged in user by parsing the RStudio-Connect-Credentials request header.

Most environments have unique usernames where each username identifies a single user. In large organizations with hundreds of users, it is possible to have two users with, for example, the same last name and initials, which could result in a duplicated username. If you're expecting such a large number of logged in users to access your Dash app, please be sure to consult your administrator to confirm whether this condition is possible in your environment.

Group meta-data is populated when using most authentication providers with the exception of LDAP. This happens because group memberships are only stored in the LDAP server.



# -*- coding: utf-8 -*-
import json

import dash
import dash_core_components as dcc
import dash_html_components as html
import flask

from dash.dependencies import Input, Output

app = dash.Dash(__name__)

app.layout = html.Div([

def get_credentials(req):
    the incoming request header "RStudio-Connect-Credentials".
    credential_header = req.headers.get("RStudio-Connect-Credentials")
    if not credential_header:
        return {}
    return json.loads(credential_header)

    [Input("salutation", "value")]
def greeting(salutation):
    user_metadata = get_credentials(flask.request)
    username = user_metadata.get("user")

if __name__ == "__main__":