Data Apps & Dashboards for Python. No JavaScript Required.
MIT License
Bot releases are hidden (Show)
Published by Marc-Andre-Rivet almost 4 years ago
app.callback(...)
a decorator.dcc.Slider
and dcc.RangerSlider
tooltips to be visible even if the slider component isn't visible (e.g. overflow),Published by Marc-Andre-Rivet about 4 years ago
flask-compress==1.6.0
causing performance degradation on server requestsPublished by Marc-Andre-Rivet about 4 years ago
Published by Marc-Andre-Rivet about 4 years ago
getTransform
logic in the renderer to handle persistenceTransforms
for both nested and non-nested persisted props. This was used to to fix dcc#700 in conjunction with dcc#854 by using persistenceTransforms to strip the time part of the datetime so that datepickers can persist when defined in callbacks.persistenceTransforms
to strip the time part of the datetime in the persited props of DatePickerSingle (date) and DatePickerRange (end_date, start_date), fixing dcc#700.prependData
to Graph
to support Plotly.prependTraces
extendTraces
API to be a single mergeTraces
API that can handle both prepend
as well as extend
.Published by Marc-Andre-Rivet about 4 years ago
script-src
hashes of all added inline scripts by calling app.csp_hashes()
(both Dash internal inline scripts, and those added with app.clientside_callback
) .n_clicks
props are used as inputs of the same callback. The callback will now trigger once with all the triggered n_clicks
props changes.callback_context.record_timing(name, seconds)
prevent_initial_call
as a positional arg in callback definitionsticklabelmode
on cartesian date axes #4993, #5055, #5060, #5065, #5088, #5089
source
attribute to image
traces for fast rendering #5075
zsmooth
attribute for discrete heatmapgl
traces #4953
rangeslider
#5025
Published by Marc-Andre-Rivet about 4 years ago
app.logger.setLevel(logging.WARNING)
.--jl-prefix
option to dash-generate-components
, optionally generates Julia version of components and corresponding Julia packageInput
, Output
, and State
in callback definitions don't need to be in lists. You still need to provide Output
items first, then Input
items, then State
, and the list form is still supported. In particular, if you want to return a single output item wrapped in a length-1 list, you should still wrap the Output
in a list. This can be useful for procedurally-generated callbacks.dcc.Loading
component
parent_className
: Add CSS class for the outermost dcc.Loading
parent div DOM nodeparent_style
: Add CSS style property for the outermost dcc.Loading
parent div DOM nodeclassName
property, which changed in #740. parent_className
(or inline styles in parent_style
) now allow CSS rules to be applied to the outermost dcc.Loading
div, which is no longer covered by className
on loading completion as of Dash Core Components >= 1.9.1
(Dash >= 1.11.0
).page_current
and page_count
fields to accommodate larger numbersPublished by Marc-Andre-Rivet about 4 years ago
title
parameter to set theupdate_title
parameter to set or disable the "Updating...." document title during updates. Closes #856 and #732
Published by rpkyle over 4 years ago
Published by Marc-Andre-Rivet over 4 years ago
Published by Marc-Andre-Rivet over 4 years ago
FLASK_ENV
is modified during app execution_wait_for_callbacks
to failPublished by Marc-Andre-Rivet over 4 years ago
Published by Marc-Andre-Rivet over 4 years ago
DASH_PROXY
env var to tell app.run_server
to report the correct URL to view your app, when it's being proxied. Throws an error if the proxy is incompatible with the host and port you've given the server.callback_context
to clientside callbacks (e.g. dash_clientside.callback_context.triggered
). Supports triggered
, inputs
, inputs_list
, states
, and states_list
, all of which closely resemble their serverside cousins.dash.testing
is compatible with more pytest
plugins, particularly pytest-flake8
and pytest-black
.cell_selectable
property to allow/disallow cell selectionPublished by Marc-Andre-Rivet over 4 years ago
@app.callback(..., prevent_initial_call=True)
and similar for app.clientside_callback
. The app-wide default can also be changed with app=Dash(prevent_initial_callbacks=True)
, then individual callbacks may disable this behavior.app.validation_layout
allows you to create a multi-page app without suppress_callback_exceptions=True
or layout function tricks. Set this to a component layout containing the superset of all IDs on all pages in your app.ALL
wildcards in their Output
which would fail if no components matched the pattern.flask.has_request_context() == False
inside an app.layout
function to provide a special layout containing all IDs for validation purposes in a multi-page app. Dash 1.11 broke this when we moved most of this validation into the renderer. This change makes it work again.title
attribute) to option dicts in dcc.Dropdown
options[]
list property.dcc.Store
components, fixing #456 whereby persistent storage could become corrupted, and fixing lifecycle issues that prevented adding Store
components to the page after initial loading.style_data_conditional
: Add support for row_index
and column_id
array of valuesstyle_header_conditional
: Add support for header_index
and column_id
array of valuesstyle_filter_conditional
: Add support for column_id
array of valuesstyle_cell_conditional
: Add support for column_id
array of valuesstyle_data_conditional
: Add new conditions state: 'active'|'selected'
to customize selected and active cell stylesactive_cell
docstring: clarify optional nature of the row_id
nested propdata=None
and columns=None
caused the table to throw an errorid
for stylesheet injection (fixes usage with Pattern-Matching callbacks)Published by Marc-Andre-Rivet over 4 years ago
ALL
, MATCH
, and ALLSMALLER
, available from dash.dependencies
. This lets you create components on demand, and have callbacks respond to any and all of them. To help with this, dash.callback_context
gets three new entries: outputs_list
, inputs_list
, and states_list
, which contain all the ids, properties, and except for the outputs, the property values from all matched components.dash.testing
option --pause
: after opening the dash app in a test, will invoke pdb
for live debugging of both Javascript and Python. Use with a single test case like pytest -k cbwc001 --pause
.dash.callback_context.triggered
now does NOT reflect any initial values, and DOES reflect EVERY value which has been changed either by activity in the app or as a result of a previous callback. That means that the initial call of a callback with no prerequisite callbacks will list nothing as triggering. For backward compatibility, we continue to provide a length-1 list for triggered
, but its id
and property
are blank strings, and bool(triggered)
is False
.uirevision
was not behaving when inside a dcc.Loading
componentPublished by Marc-Andre-Rivet over 4 years ago
dash.run_server()
host and port parameters to be set with environment variables HOST & PORT, respectivelyPublished by Marc-Andre-Rivet over 4 years ago
number
did not correctly update their values.Published by Marc-Andre-Rivet almost 5 years ago
app.get_relative_path
& app.trim_relative_path
.app.get_relative_path
returns a path with the config setting requests_pathname_prefix
prefixed. Use app.get_relative_path
anywhere you would provide a relative pathname, like dcc.Link(href=app.relative_path('/page-2'))
or even as an alternative to app.get_asset_url
with e.g. html.Img(src=app.get_relative_path('/assets/logo.png'))
.app.trim_relative_path
a path with requests_pathname_prefix
and leading & trailingdcc.Location
pathname
app.layout = html.Div([
dcc.Location(id='url'),
html.Div(id='content')
])
@app.callback(Output('content', 'children'), [Input('url', 'pathname')])
def display_content(path):
page_name = app.strip_relative_path(path)
if not page_name: # None or ''
return html.Div([
html.Img(src=app.get_relative_path('/assets/logo.png')),
dcc.Link(href=app.get_relative_path('/page-1')),
dcc.Link(href=app.get_relative_path('/page-2')),
])
elif page_name == 'page-1':
return chapters.page_1
if page_name == "page-2":
return chapters.page_2
dcc.Link
(dccLink) and nested dcc.Markdown
(dccMarkdown) react components inside of dcc.Markdown
responsive
property that overrides the underlying Plotly.js graph responsiveness from Dash-landdash-graph--pending
class to dcc.Graph, present while resizing, (re-)rendering, loadinghighlight.js
is now bundled into the package, and no longer sets the window.hljs
variable. Similarly to how plotly.js
is handled, it is overridden by a user-provided version if one exists.presentation
is specified as markdown
.
window.hljs
is specified, that will be used for highlighting instead.Published by Marc-Andre-Rivet almost 5 years ago
visit_and_snapshot
API in dash.testing.browser
to stay on the page so you can run other checks.children
in an array, and they get passed to other props.dash.testing
stop API with process application runner in Python2. Use kill()
instead of communicate()
to avoid hanging.min
and max
are now omitted when the slider renders.marks
labels.verticalHeight
to Slider and RangeSlider, to allow the user to specify the height (in px) of vertical sliders. This defaults to 400
.Published by Marc-Andre-Rivet almost 5 years ago
clear_input()
API in dash.testing
, so it's more robust handling react input
.percy_snapshot()
API more robust, and the timeout of wait_for_callbacks
(if set to True) will not fail the snapshot execution, but logged as potential error.start_date
, min_date_allowed
, end_date
, or max_date_allowed
for the initial visible month if the value of the parameter initial_visible_month
is not supplied.loading_state
being handled incorrectly, causing the table to steal focusPublished by Marc-Andre-Rivet almost 5 years ago
metadata
in version.