Skip to main content

Datapane client library and CLI tool

Project description

Datapane

Docs | Cloud | Discussions | Discord

Pip Downloads Latest release Conda (channel only)

Build full-stack data analytics apps in Python

Datapane is an open-source framework for building robust, high-performance data apps from Python and Jupyter.



Why use Datapane?

🚀 Not just for demos

Build performant, robust full-stack apps which are simple to deploy and manage on any hosting platform. Add background processing, auth, and monitoring to go beyond MVPs.

📈 Share standalone reports with no server

Export static HTML reports which you can share on Slack or Email, with no backend required.

📙 Ship apps from Jupyter

Build and ship data apps from inside your Jupyter Notebook and existing scripts in <5 lines of code.

Other Features

  • User sessions and state handling
  • Intelligent caching
  • Sub-5ms function response time
  • Easy integration with authentication/authorization
  • Integrate into existing web frameworks (like Flask or FastAPI)
  • Host on existing web-hosts, like Fly and Heroku
  • Background processing

How is Datapane's architecture unique?

Datapane Apps use a combination of pre-rendered frontend elements and backend Python functions which are called on-demand. Result: low-latency apps which are simple to build, host, and scale.

Getting Started

Want a head start? Check out our Getting Started guide to build a data science web app in 3m.

Installing Datapane

The best way to install Datapane is through pip or conda.

pip

$ pip3 install -U datapane

conda

$ conda install -c conda-forge "datapane>=0.15.6"

Datapane also works well in hosted Jupyter environments such as Colab or Binder, where you can install as follows:

!pip3 install --quiet datapane

Examples

📊 Share plots, data, and more as reports

Create reports from pandas DataFrames, plots from your favorite libraries, and text.

Simple Datapane app example with text, plot and table

import altair as alt
from vega_datasets import data
import datapane as dp

df = data.iris()
fig = (
    alt.Chart(df)
    .mark_point()
    .encode(
        x="petalLength:Q",
        y="petalWidth:Q",
        color="species:N"
    )
)
view = dp.Blocks(
    dp.Plot(fig),
    dp.DataTable(df)
)
dp.save_report(view, path="my_app.html")

🎛 Layout using interactive blocks

Add dropdowns, selects, grid, pages, and 10+ other interactive blocks.

Complex layout

...

view = dp.Blocks(
    dp.Formula("x^2 + y^2 = z^2"),
    dp.Group(
        dp.BigNumber(
            heading="Number of percentage points",
            value="84%",
            change="2%",
            is_upward_change=True
        ),
        dp.BigNumber(
            heading="Simple Statistic", value=100
        ), columns=2
    ),
    dp.Select(
        dp.Plot(fig, label="Chart"),
        dp.DataTable(df, label="Data")
    ),
)
dp.save_report(view, path="layout_example.html")

Add functions to create full-stack apps

Add forms which run backend functions, or refresh your app automatically to build dashboards. Serve locally or deploy to your favorite web-host.

Functions

import altair as alt
from vega_datasets import data
import datapane as dp

df = data.iris()

def gen_assets(params):
    subset = df[df['species'] == params['species']]

    fig = alt.Chart(subset)
            .mark_point()
            .encode( x="petalLength:Q", y="petalWidth:Q")

    return [dp.Plot(fig), dp.DataTable(subset)]

view = dp.Form(
    on_submit=gen_assets,
    controls=dp.Controls(
      species=dp.Choice(options=list(df['species'].unique())
    )
)

dp.serve_app(view)

Get involved

Discord

Get help from the team, share what you're building, and get to know others in the space!

💬 Join our discord server

Feedback

Leave us some feedback, ask questions and request features.

📮 Give feedback

Forums

Need technical help? Reach out on GitHub discussions.

📜 Ask a question

Contribute

Looking for ways to contribute to Datapane?

Visit the contribution guide.

Next Steps

Analytics

By default, the Datapane Python library collects error reports and usage telemetry. This is used by us to help make the product better and to fix bugs. If you would like to disable this, simply create a file called no_analytics in your datapane config directory, e.g.

Linux

$ mkdir -p ~/.config/datapane && touch ~/.config/datapane/no_analytics

macOS

$ mkdir -p ~/Library/Application\ Support/datapane && touch ~/Library/Application\ Support/datapane/no_analytics

Windows (PowerShell)

PS> mkdir ~/AppData/Roaming/datapane -ea 0
PS> ni ~/AppData/Roaming/datapane/no_analytics -ea 0

You may need to try ~/AppData/Local instead of ~/AppData/Roaming on certain Windows configurations depending on the type of your user-account.

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

datapane-0.16.1.tar.gz (188.6 kB view details)

Uploaded Source

Built Distribution

datapane-0.16.1-py3-none-any.whl (226.0 kB view details)

Uploaded Python 3

File details

Details for the file datapane-0.16.1.tar.gz.

File metadata

  • Download URL: datapane-0.16.1.tar.gz
  • Upload date:
  • Size: 188.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.10 Linux/5.15.0-1033-azure

File hashes

Hashes for datapane-0.16.1.tar.gz
Algorithm Hash digest
SHA256 7c7681dc62c5582e4f2b155d37a045497a2761520255627119b78faab654fe84
MD5 44d1ed708a759e3d5f359b69ea4824d6
BLAKE2b-256 9bc024c4d7fa939d3dd01f5a1f9f54c6cd75978fbd71102cd7017ff5f7f255c8

See more details on using hashes here.

File details

Details for the file datapane-0.16.1-py3-none-any.whl.

File metadata

  • Download URL: datapane-0.16.1-py3-none-any.whl
  • Upload date:
  • Size: 226.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.10 Linux/5.15.0-1033-azure

File hashes

Hashes for datapane-0.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c47e4619a670741f0cc6aef6ca7703f97fcd0f9fc3b7a97ba736673f58f04a1f
MD5 f29dc195294fd736bb9424833b7a7643
BLAKE2b-256 62c25b6c60d148bd540be7d2591f6395e7f6cf8e40d3b2f13e08ce99f2bbde62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page