Jon Mease
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    Hi Everyone! Today, I'm happy to introduce a new project we've been working on to extend what's possible with Dash, and to make it easier than ever to get started making an app. The project is called Dash Labs. Before taking a tour of some of the new features we're working on, I want to make clear that nothing here is set in stone yet. We would love for you all to play with it (installation instructions below), and give us your feedback. **For context, our plan is to take the successful ideas from this project, stabilize them, and incorporate them into Dash 2 later this year.** ## Design Goals Dash Labs began with several interdependent design goals: - Provide a more concise syntax for generating simple Dash apps that follow a variety of nice looking, predefined templates. - Make it even simpler to turn Python scripts by data scientists into apps for business end users. - Ensure that there is a smooth continuum between concision, and the flexibility and power of "full Dash". The concise syntax should not be a dead-end, requiring a user to rewrite the app in order to reach a certain level of sophistication. - Make it possible for third-party developers to make and distribute their own custom templates. - Improve the ability of users to encapsulate and reuse custom interactive component workflows, and make it possible for third-party developers to distribute these as component plugins. - Ensure deployment and hyperscalability of Dash apps on [Dash Enterprise](https://plotly.com/dash) is seamless. ## Installation and GitHub repo To try out what we have so far, install the `dash-labs` package using pip ```plain $ pip install dash-labs ``` The GitHub repo for Dash Labs is at https://github.com/plotly/dash-labs. ## Documentation and Feature Overview The documentation for Dash Labs currently consists of a series of markdown documents in the [`docs/`](https://github.com/plotly/dash-labs/tree/main/docs) directory of the repo. Here's a quick tour of the documentation sections. #### [01-Overview.md](https://github.com/plotly/dash-labs/blob/main/docs/01-Overview.md) This section includes a quick discussion of the motivations behind Dash Labs, more thorough installation instructions, and a description of how to activate the Dash Labs functionality using the `FlexibleCallback` Dash plugin. #### [02-CallbackEnhancements.md](https://github.com/plotly/dash-labs/blob/main/docs/02-CallbackEnhancements.md) This section describes several core enhancements to `@app.callback` that are provided by Dash Labs. Callback enhancements include: - Support for callback functions that accept named keyword arguments instead of positional arguments. - Support for grouping multiple input or output property values into dictionaries and tuples. - Support for providing a component instance instead of a component id when defining a callback. We believe these enhancements will all be useful on their own, but they are also foundational to the Template and Component Plugin features described below. #### [03-TemplateLayoutSystem.md](https://github.com/plotly/dash-labs/blob/main/docs/03-TemplateLayoutSystem.md) The new template layout system makes it possible to create an app by adding components to a template. Templates can be used on their own, but they really shine when combined with the new `@app.callback` functionality. Together, they enable a workflow that is reminiscent of the classic ipywidgets [`@interact`](https://ipywidgets.readthedocs.io/en/latest/examples/Using%20Interact.html) decorator. Here's a full example: ```python import dash_labs as dl import dash import numpy as np import dash_core_components as dcc import plotly.express as px app = dash.Dash(__name__, plugins=[dl.plugins.FlexibleCallbacks()]) tpl = dl.templates.dbc.DbcSidebar(title="Sample App") @app.callback( args=dict( fun=tpl.dropdown_input(["sin", "cos", "exp"], label="Function"), figure_title=tpl.textbox_input("Initial Title", label="Figure Title"), phase=tpl.slider_input(1, 10, label="Phase"), amplitude=tpl.slider_input(1, 10, value=3, label="Amplitude"), ), template=tpl, ) def greet(fun, figure_title, phase, amplitude): xs = np.linspace(-10, 10, 100) return dcc.Graph( figure=px.line(x=xs, y=getattr(np, fun)(xs + phase) * amplitude).update_layout( title_text=figure_title ) ) app.layout = tpl.layout(app) if __name__ == "__main__": app.run_server(debug=True) ``` ![](https://i.imgur.com/hlgE1Eq.gif) #### [04-PredefinedTemplates.md](https://github.com/plotly/dash-labs/blob/main/docs/04-PredefinedTemplates.md) Dash Labs includes a bunch of examples of the kind of custom templates that are possible now. Most of them are built on [`dash-bootstrap-components`](https://dash-bootstrap-components.opensource.faculty.ai/) or [`dash-design-kit`](https://plotly.com/dash/design-kit/) Both the Dash Bootstrap and Dash Design Kit templates support styling plotly figures to match the overall app theme. Here are a few examples ##### Dash Bootstrap Templates ![](https://i.imgur.com/ky7Yctu.png) ![](https://i.imgur.com/KAgGsiu.png) ##### Dash Design Kit Templates ![](https://i.imgur.com/2D7qbNO.png) ![](https://i.imgur.com/1M4KJ3D.png) If you're interested, please take a look at the design of these templates, and try your hand at creating your own! #### [05-ComponentPlugingPattern.md](https://github.com/plotly/dash-labs/blob/main/docs/05-ComponentPlugingPattern.md) This section includes a proposed architecture that can be used to encapsulate component construction and callback logic into a self contained class instance. We're calling these *Component Plugins*. One concrete example that we're pretty excited about is the `DataTablePlugin`. This component plugin makes it possible to create and use a Dash DataTable instance that performs serverside sorting, paging, and filtering without specifying any of the callback logic manually. (See https://dash.plotly.com/datatable/callbacks for an overview of the callback logic that's currently required to enable these features). ![](https://i.imgur.com/4GvLAqZ.gif) In addition to the `DataTablePlugin`, there are a couple other examples discussed in the documentation. We think this design pattern opens up a lot of exciting opportunities to encapsulate and share advanced Dash workflows, so we're really interested in your feedback on the approach. ## [Dash Enterprise](https://plotly.com/dash) 10% of the Fortune 500 uses Dash Enterprise to bring Python analytics to their business users. We've worked closely with these customers to ensure Dash Labs (and eventually Dash 2.0) will delivery ever increasing value: - [Job queues](https://plotly.com/dash/job-queue/) will be introduced in future iterations of Dash Labs, allowing seamleses execution of long-runnning Python tasks triggered by Dash callbacks. Dash apps with job queues can then be deployed to Dash Enterprise's [multi-node Kubernetes cluster](https://plotly.com/dash/kubernetes/), ensuring that they scale to 10s, 100s, or 1000s of business end users. - Dash Labs Templates integrate seamlessly with [Design Kit](https://plotly.com/dash/design-kit/) for pixel-perfect, mobile-ready, on-brand Dash app aethstetic. - The [AI App Catologue](https://plotly.com/dash/ai-and-ml-templates/) will begin shipping with Dash Labs examples, allowing creating of ML & AI Dash apps for business end users in even fewer lines of code. ## Call for feedback As I mentioned, we would really appreciate any feedback you have on the functionality of Dash Labs. Here are few things to think about: - If you're a relatively new Dash user, do you think it would have been easier to get started using the template system? - If you're an experienced Dash user, do you think it would be helpful to be able to build your own templates and/or component plugins to share with other Dash users? Do the proposed designs of these systems make sense? Feel free to share general thoughts in this thread, or to open GitHub issues if you run into bugs or would like to discuss particular features in more detail. ## Thanks! Finally, I just want to take the opportunity to thank everyone reading this for being a valuable member of the Dash community. We're continually inspired by the things you all make with Dash, and we're thankful for how you've made this such a welcoming community. With your help, we're committed to continually pushing Dash forward!

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully