Package datapane.client.api

API docs for Datapane Client

These docs describe the Python API for building Datapane documents, along with additional information on the Datapane Cloud API.

Usage docs for Datapane can be found at https://docs.datapane.com

These objects are all available under the datapane module, via import datapane as dp (they are re-exported from datapane.client.api).

Datapane Reports API

The core document APIs are available for both Datapane Community and Datapane Cloud, these are found in datapane.client.api.report, including,

Datapane Cloud

Additional API docs are found in datapane.client.api.cloud that provide building, deployment, and sharing of data analytics apps and workflows

Note: These docs describe the latest version of the datapane API available on pypi

Latest release

Sub-modules

datapane.client.api.cloud

Datapane Cloud API …

datapane.client.api.common

Common objects …

datapane.client.api.dp_object

Base classes …

datapane.client.api.files
datapane.client.api.files_optional
datapane.client.api.report

Main Document API module, includes both the core Report object, and the blocks in …

datapane.client.api.runtime

Script runtime API …

datapane.client.api.templates

Datapane helper functions to make creating your reports a bit simpler and reduce common tasks …

datapane.client.api.user

Datapane User API …

Classes

class Markdown (*a, **kw)

Markdown objects store Markdown text that can be displayed as formatted text when viewing your report.

Note: This object is also available as dp.Text, and any strings provided directly to the Report/Group object are converted automatically to Markdown blocks

Tip: You can also insert a dataframe in a Markdown block as a table by using df.to_markdown(), or use dp.Table or dp.DataTable for dedicated dataframe tables.

Args:te text: The markdown formatted text, use triple-quotes, ("""# My Title""") to create multi-line markdown text file: Path to a file containing markdown text name: A unique name for the block to reference when adding text or embedding (optional)

Ancestors

Class variables

var content : str

Methods

def format(self, *args: Union[ForwardRef('Group'), ForwardRef('Select'), ForwardRef('DataBlock'), Any], **kwargs: Union[ForwardRef('Group'), ForwardRef('Select'), ForwardRef('DataBlock'), Any]) ‑> Group

Inherited from: Text.format

Format the markdown text template, using the supplied context to insert blocks into {{}} markers in the template …

class Blocks (*a, **kw)

Groups act as a container that hold a list of nested Blocks object, such as Tables, Plots, etc.. - they may even hold Group themselves recursively.

Group are used to provide a grouping for blocks can have layout options applied to them

Note: Group expects a list of Blocks, e.g. a Plot or Table, but also including Select or Groups themselves,

but if a Python object is passed, e.g. a Dataframe, Datapane will attempt to convert it automatically.

Args

*arg_blocks
Group to add to report
blocks
Allows providing the report blocks as a single list
name
A unique id for the blocks to aid querying (optional)
label
A label used when displaying the block (optional)
rows
Display the contained blocks, e.g. Plots, using n rows (set to 0 to autofill)
columns
Display the contained blocks, e.g. Plots, using n columns (set to 0 to autofill)

Tip: Group can be passed using either arg parameters or the blocks kwarg, e.g.

dp.Group(plot, table, columns=2) or dp.Group(blocks=[plot, table], columns=2)

Ancestors

Class variables

var blocks : List[Union[GroupSelectDataBlock]]