Skip to main content

Turn your Python functions into interactive web applications. Fast Dash is an innovative way to build and deploy your Python code as interactive apps with minimal changes to your original code.

Project description

Fast Dash

Open source, Python-based tool to build prototypes lightning fast ⚡

Release Status CI Status MIT License Documentation Downloads



Fast Dash is a Python module that makes the development of web applications fast and easy. It can build web interfaces for Machine Learning models or to showcase any proof of concept without the hassle of developing UI from scratch.

FastDashDemo

Examples

With Fast Dash's decorator @fastdash, it's a breeze to deploy any Python function as a web app. Here's how to use it to write your first Fast Dash app:

from fast_dash import fastdash

@fastdash
def text_to_text_function(input_text):
    return input_text

# * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)

And just like that, we have a completely functional interactive app!

Output: Simple example

Fast Dash can read all the function details, like its name, input and output types, docstring, and uses this information to infer which components to use.

For example, here's how to deploy an app that takes a string and an integer as inputs and returns some text.

from fast_dash import fastdash

@fastdash
def display_selected_text_and_number(text: str, number: int) -> str:
    "Simply display the selected text and number"

    processed_text = f'Selected text is {text} and the number is {number}.'
    
    return processed_text

# * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)

Output: Simple example with multiple inputs

And with just a few more lines, we can add a title icon, subheader and other social branding details.


Output components can be arranged using a mosaic layout (ASCII art), inspired from Matplotlib's subplot_mosaic feature.

from fast_dash import fastdash, UploadImage, Graph
import matplotlib.pyplot as plt

mosaic = """
AB
AC
"""

@fastdash(mosaic=mosaic, theme="BOOTSTRAP")
def multiple_output_components(start_date: datetime.date, # Adds a date component
                            upload_image: UploadImage, # Adds an upload component
                            fips: str = [List of FIPs]) # Adds a single select dropdown
                            -> (Graph, plt.Figure, plt.Figure): 
                            # Output components are a Plotly graph, and two figure components

    "Fast Dash allows using mosaic arrays to arrange output components"

    choropleth_map = ...
    histogram = ...
    radar_chart = ...
    
    return chloropleth_map, histogram, radar_chart

# * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)

Simple example with multiple inputs

In just a few lines of code, you can also add a chat component.

Simple chat

You can use your favorite Python libraries. Here's an example of an advanced geospatial application built using geemap and Google Earth Engine.

Water spectral indices

About

Read different ways to build Fast Dash apps and additional details by navigating to the project documentation.

Key features

Duild and deploy a web app by adding a decorator only.

  • Components are inferred from function type hints. Allows using Dash components as type hints.
  • Use multiple input and output components simultaneously.
  • Build fast, share and iterate.

Community

Fast Dash is built using Plotly Dash and it's completely open-source.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_dash-0.2.10.tar.gz (49.3 kB view details)

Uploaded Source

Built Distribution

fast_dash-0.2.10-py3-none-any.whl (47.0 kB view details)

Uploaded Python 3

File details

Details for the file fast_dash-0.2.10.tar.gz.

File metadata

  • Download URL: fast_dash-0.2.10.tar.gz
  • Upload date:
  • Size: 49.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fast_dash-0.2.10.tar.gz
Algorithm Hash digest
SHA256 51ade74810ecf8c935e8f01bcaafdcb6868a65b68451f0ad59b5897fef2ff9ba
MD5 68712b56272f40f8176fd5b0b6ceb288
BLAKE2b-256 6d2906dc519b44062850312bb9818878f5918b18a9e3181ff6b98665b5adb6b7

See more details on using hashes here.

File details

Details for the file fast_dash-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: fast_dash-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 47.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fast_dash-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b2263e822134306d8ae85aac64982c2a8e7e59aafddf4d8fecd3e2820d9f3740
MD5 6e9db8b7aef9be9e9edf61651f4d8c14
BLAKE2b-256 943c241c3beffcf8db9a4907fcdfb6136b3c9948b236e03859ce3c38284ba228

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page