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
Open source, Python-based tool to build prototypes lightning fast ⚡
- Documentation: https://docs.fastdash.app
- Source code: github.com/dkedar7/fast_dash
- Installation:
pip install fast-dash
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.
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:
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:
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)
In just a few lines of code, you can also add a chat component.
You can use your favorite Python libraries. Here's an example of an advanced geospatial application built using geemap
and Google Earth Engine.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fast_dash-0.2.9.tar.gz
.
File metadata
- Download URL: fast_dash-0.2.9.tar.gz
- Upload date:
- Size: 55.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fbf8bffeba26ced0dd066f1be302f82306fd81bfd1652ceecacccf0b143bb4f |
|
MD5 | 5e6cda32b435ecf5ad1fa381d0109488 |
|
BLAKE2b-256 | f73d755c3f2f4feec82d3888630fafd145f46d71c7069b9438f81c46464d97f6 |
File details
Details for the file fast_dash-0.2.9-py3-none-any.whl
.
File metadata
- Download URL: fast_dash-0.2.9-py3-none-any.whl
- Upload date:
- Size: 46.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b1a58dad621d3799f52042ff322d15dea786cafd7957d471058a385b27cda6 |
|
MD5 | 0986f3ad19ffeada56c103434d226b7b |
|
BLAKE2b-256 | 358946da2277fd0ac49c1ded426bd436bf1e8bdab38d9081c18268153b08a5c4 |