Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01a6870

Browse files
committed
dash api
1 parent 574e461 commit 01a6870

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

plotly/api/v2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from __future__ import absolute_import
22

3-
from plotly.api.v2 import (dashboards, files, folders, grids, images, plot_schema,
4-
plots, users)
3+
from plotly.api.v2 import (dash_apps, dashboards, files, folders, grids,
4+
images, plot_schema, plots, users)

plotly/api/v2/dash_apps.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
Beta interface to Plotly's /v2/dash-apps endpoints.
3+
"""
4+
from __future__ import absolute_import
5+
6+
from plotly.api.v2.utils import build_url, request
7+
8+
RESOURCE = 'dash-apps'
9+
10+
11+
def create(body):
12+
"""Create a dash app item."""
13+
url = build_url(RESOURCE)
14+
return request('post', url, json=body)
15+
16+
17+
def retrieve(fid):
18+
"""Retrieve a dashboard from Plotly."""
19+
url = build_url(RESOURCE, id=fid)
20+
return request('get', url)
21+
22+
23+
def update(fid, content):
24+
"""Completely update the writable."""
25+
url = build_url(RESOURCE, id=fid)
26+
return request('put', url, json=content)

0 commit comments

Comments
 (0)