Skip to main content

dash-chalice

This package integrates Plotly Dash with AWS Chalice. It provides a DashChalice object which is largely a slot-in replacement for dash.Dash, but with the underlying Flask server object replaced with a Chalice one. It aims to provide a more natural path for deployment using AWS Lambda than Zappa.

A simple example is given below. Note that Chalice expects projects to have a particular structure. To run this example, save the code below as app.py and include an empty JSON object {} within .chalice/config.json in the same directory. The example can then be run locally with chalice local.

import dash_html_components as html
import dash_core_components as dcc
from dash.dependencies import Input, Output
from dash_chalice import DashChalice


dash_app = DashChalice(__name__, title="Example")
dash_app.layout = html.Div(
    [
        dcc.Input(id="input", placeholder="Please type a name"),
        html.Div(id="output"),
    ]
)


@dash_app.callback(
    Output("output", "children"),
    Input("input", "value"),
)
def set_output(input):
    return "Hello!" if input in (None, "") else f"Hello {input}!"


# this needs to be called after the dash app has been set up
dash_app.finalise()

# nb: chalice expects an app variable to be exposed for running/deployment
app = dash_app.server

For more information on structuring and deploying apps with Chalice, see the documentation. In addition, you may find these workshop notes useful, as I have.

Metadata

Release files for dash-chalice 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dash-chalice 0.1.1
File Size Uploaded Provenance Actions
dash-chalice-0.1.1.tar.gz 16.7 kB Without provenance Details for dash-chalice-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dash-chalice 0.1.1
File Interpreter ABI Platform Actions
dash_chalice-0.1.1-py3-none-any.whl Python 3 none any Details for dash_chalice-0.1.1-py3-none-any.whl

Total release size: 33.5 kB

Release files / dash-chalice-0.1.1.tar.gz

Download URL dash-chalice-0.1.1.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ba99a80c134a00dfbd4979ae6c54855c629c0132e07bbbf4233ce734963e4d06
BLAKE2b-256 checksum
How to use checksums
22142a987885c5b77cc728d98248ebca0ab465a6b98cc75d413496b2984ab864
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.10

Release files / dash_chalice-0.1.1-py3-none-any.whl

Download URL dash_chalice-0.1.1-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
169280e1e9df4f3c06f4791f62b48f99b17d9d5b639acbc28ab5d1ea0f4057f1
BLAKE2b-256 checksum
How to use checksums
fd6ee673516e05415ad8651adf6a6c9f8b078070b31b3d8c3ddb2c7965494152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.10

Security for dash-chalice 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page