Skip to main content

Serves up pandas dataframes via the Django REST Framework for client-side visualizations.

Project description

Django REST Pandas

Django REST Framework + pandas = A Model-driven Visualization API

Django REST Pandas (DRP) provides a simple way to generate and serve pandas DataFrames via the Django REST Framework. The resulting API can serve up CSV (and a number of other formats for consumption by a client-side visualization tool like @wq/analyst.

The design philosophy of DRP enforces a strict separation between data and presentation. This keeps the implementation simple, but also has the nice side effect of making it trivial to provide the source data for your visualizations. This capability can often be leveraged by sending users to the same URL that your visualization code uses internally to load the data.

While DRP is primarily a data API, it also provides a default collection of interactive visualizations through the @wq/chart library, and a @wq/pandas loader to facilitate custom JavaScript charts that work well with CSV output served by DRP. These can be used to create interactive time series, scatter, and box plot charts - as well as any of the other charting possibilities Plotly provides.

Latest PyPI Release Release Notes License GitHub Stars GitHub Forks GitHub Issues

Tests Python Support Django Support

Documentation

DRP is configured by defining one or more API views and mapping them to URLs. The underlying implementation is a set of serializers that take Django REST Framework's serializer output and converts it into a dataframe. Then, the included renderers generate the output file using pandas' built in functionality.

  1. Getting Started

  2. API Documentation

  3. Data Visualization

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rest-pandas-2.0.0a1.tar.gz (214.3 kB view hashes)

Uploaded Source

Built Distribution

rest_pandas-2.0.0a1-py3-none-any.whl (70.2 kB view hashes)

Uploaded Python 3

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