%global _empty_manifest_terminate_build 0 Name: python-rest-pandas Version: 1.1.0 Release: 1 Summary: Serves up pandas dataframes via the Django REST Framework for client-side(i.e. d3.js) visualizations License: MIT URL: https://github.com/wq/django-rest-pandas Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7e/82/f9118959f7e108c9ffe320d0b6e7f6c0b8f0a6651aad7703a78dc2430855/rest-pandas-1.1.0.tar.gz BuildArch: noarch Requires: python3-djangorestframework Requires: python3-pandas %description #### [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](#supported-formats)) for consumption by a client-side visualization tool like [d3.js]. 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. DRP does not include any JavaScript code, leaving the implementation of interactive visualizations as an exercise for the implementer. That said, DRP is commonly used in conjunction with the [wq.app] library, which provides [wq/chart.js] and [wq/pandas.js], a collection of chart functions and data loaders that work well with CSV served by DRP. [![Latest PyPI Release](https://img.shields.io/pypi/v/rest-pandas.svg)](https://pypi.python.org/pypi/rest-pandas) [![Release Notes](https://img.shields.io/github/release/wq/django-rest-pandas.svg )](https://github.com/wq/django-rest-pandas/releases) [![License](https://img.shields.io/pypi/l/rest-pandas.svg)](https://github.com/wq/django-rest-pandas/blob/master/LICENSE) [![GitHub Stars](https://img.shields.io/github/stars/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/network) [![GitHub Issues](https://img.shields.io/github/issues/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/issues) [![Travis Build Status](https://img.shields.io/travis/wq/django-rest-pandas.svg)](https://travis-ci.org/wq/django-rest-pandas) [![Python Support](https://img.shields.io/pypi/pyversions/rest-pandas.svg)](https://pypi.org/project/rest-pandas) [![Django Support](https://img.shields.io/pypi/djversions/rest-pandas.svg)](https://pypi.org/project/rest-pandas) ## Live Demo The [climata-viewer] project uses Django REST Pandas and [wq/chart.js] to provide interactive visualizations and spreadsheet downloads. ## Related Work The field of Python-powered data analysis and visualization is growing, and there are a number of similar solutions that may fit your needs better. * [Django Pandas] provides a custom ORM model manager with pandas support. By contrast, Django REST Pandas works at the *view* level, by integrating pandas via custom Django REST Framework serializers and renderers. * [DRF-CSV] provides straightforward CSV renderers for use with Django REST Framework. It may be useful if you just want a CSV API and don't have a need for the pandas DataFrame functionality. * [mpld3] provides a direct bridge from [matplotlib] to [d3.js], complete with seamless [IPython] integration. It is restricted to the (large) matplotlib chart vocabularly but should be sufficient for many use cases. * [Bokeh] is a complete client-server visualization platform. It does not leverage d3 or Django, but is notable as a comprehensive, forward-looking approach to addressing similar use cases. The goal of Django REST Pandas is to provide a generic REST API for serving up pandas dataframes. In this sense, it is similar to the Plot Server in Bokeh, but more generic in that it does not assume any particular visualization format or technology. Further, DRP is optimized for integration with public-facing Django-powered websites (unlike mpld3 which is primarily intended for use within IPython). In summary, DRP is designed for use cases where: * You want to support live spreadsheet downloads as well as interactive visualizations, and/or * You want full control over the client visualization stack in order to integrate it with the rest of your website and/or build process. This usually means writing JavaScript code by hand. [mpld3] may be a better choice for data exploration if you are more comfortable with (I)Python and need something that can generate interactive visualizations out of the box. ## Supported Formats The following output formats are provided by default. These are provided as [renderer classes] in order to leverage the content type negotiation built into Django REST Framework. This means clients can specify a format via: * an HTTP "Accept" header (`Accept: text/csv`), * a format parameter (`/path?format=csv`), or * a format extension (`/path.csv`) The HTTP header and format parameter are enabled by default on every pandas view. Using the extension requires a custom URL configuration (see below). %package -n python3-rest-pandas Summary: Serves up pandas dataframes via the Django REST Framework for client-side(i.e. d3.js) visualizations Provides: python-rest-pandas BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-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](#supported-formats)) for consumption by a client-side visualization tool like [d3.js]. 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. DRP does not include any JavaScript code, leaving the implementation of interactive visualizations as an exercise for the implementer. That said, DRP is commonly used in conjunction with the [wq.app] library, which provides [wq/chart.js] and [wq/pandas.js], a collection of chart functions and data loaders that work well with CSV served by DRP. [![Latest PyPI Release](https://img.shields.io/pypi/v/rest-pandas.svg)](https://pypi.python.org/pypi/rest-pandas) [![Release Notes](https://img.shields.io/github/release/wq/django-rest-pandas.svg )](https://github.com/wq/django-rest-pandas/releases) [![License](https://img.shields.io/pypi/l/rest-pandas.svg)](https://github.com/wq/django-rest-pandas/blob/master/LICENSE) [![GitHub Stars](https://img.shields.io/github/stars/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/network) [![GitHub Issues](https://img.shields.io/github/issues/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/issues) [![Travis Build Status](https://img.shields.io/travis/wq/django-rest-pandas.svg)](https://travis-ci.org/wq/django-rest-pandas) [![Python Support](https://img.shields.io/pypi/pyversions/rest-pandas.svg)](https://pypi.org/project/rest-pandas) [![Django Support](https://img.shields.io/pypi/djversions/rest-pandas.svg)](https://pypi.org/project/rest-pandas) ## Live Demo The [climata-viewer] project uses Django REST Pandas and [wq/chart.js] to provide interactive visualizations and spreadsheet downloads. ## Related Work The field of Python-powered data analysis and visualization is growing, and there are a number of similar solutions that may fit your needs better. * [Django Pandas] provides a custom ORM model manager with pandas support. By contrast, Django REST Pandas works at the *view* level, by integrating pandas via custom Django REST Framework serializers and renderers. * [DRF-CSV] provides straightforward CSV renderers for use with Django REST Framework. It may be useful if you just want a CSV API and don't have a need for the pandas DataFrame functionality. * [mpld3] provides a direct bridge from [matplotlib] to [d3.js], complete with seamless [IPython] integration. It is restricted to the (large) matplotlib chart vocabularly but should be sufficient for many use cases. * [Bokeh] is a complete client-server visualization platform. It does not leverage d3 or Django, but is notable as a comprehensive, forward-looking approach to addressing similar use cases. The goal of Django REST Pandas is to provide a generic REST API for serving up pandas dataframes. In this sense, it is similar to the Plot Server in Bokeh, but more generic in that it does not assume any particular visualization format or technology. Further, DRP is optimized for integration with public-facing Django-powered websites (unlike mpld3 which is primarily intended for use within IPython). In summary, DRP is designed for use cases where: * You want to support live spreadsheet downloads as well as interactive visualizations, and/or * You want full control over the client visualization stack in order to integrate it with the rest of your website and/or build process. This usually means writing JavaScript code by hand. [mpld3] may be a better choice for data exploration if you are more comfortable with (I)Python and need something that can generate interactive visualizations out of the box. ## Supported Formats The following output formats are provided by default. These are provided as [renderer classes] in order to leverage the content type negotiation built into Django REST Framework. This means clients can specify a format via: * an HTTP "Accept" header (`Accept: text/csv`), * a format parameter (`/path?format=csv`), or * a format extension (`/path.csv`) The HTTP header and format parameter are enabled by default on every pandas view. Using the extension requires a custom URL configuration (see below). %package help Summary: Development documents and examples for rest-pandas Provides: python3-rest-pandas-doc %description help #### [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](#supported-formats)) for consumption by a client-side visualization tool like [d3.js]. 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. DRP does not include any JavaScript code, leaving the implementation of interactive visualizations as an exercise for the implementer. That said, DRP is commonly used in conjunction with the [wq.app] library, which provides [wq/chart.js] and [wq/pandas.js], a collection of chart functions and data loaders that work well with CSV served by DRP. [![Latest PyPI Release](https://img.shields.io/pypi/v/rest-pandas.svg)](https://pypi.python.org/pypi/rest-pandas) [![Release Notes](https://img.shields.io/github/release/wq/django-rest-pandas.svg )](https://github.com/wq/django-rest-pandas/releases) [![License](https://img.shields.io/pypi/l/rest-pandas.svg)](https://github.com/wq/django-rest-pandas/blob/master/LICENSE) [![GitHub Stars](https://img.shields.io/github/stars/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/network) [![GitHub Issues](https://img.shields.io/github/issues/wq/django-rest-pandas.svg)](https://github.com/wq/django-rest-pandas/issues) [![Travis Build Status](https://img.shields.io/travis/wq/django-rest-pandas.svg)](https://travis-ci.org/wq/django-rest-pandas) [![Python Support](https://img.shields.io/pypi/pyversions/rest-pandas.svg)](https://pypi.org/project/rest-pandas) [![Django Support](https://img.shields.io/pypi/djversions/rest-pandas.svg)](https://pypi.org/project/rest-pandas) ## Live Demo The [climata-viewer] project uses Django REST Pandas and [wq/chart.js] to provide interactive visualizations and spreadsheet downloads. ## Related Work The field of Python-powered data analysis and visualization is growing, and there are a number of similar solutions that may fit your needs better. * [Django Pandas] provides a custom ORM model manager with pandas support. By contrast, Django REST Pandas works at the *view* level, by integrating pandas via custom Django REST Framework serializers and renderers. * [DRF-CSV] provides straightforward CSV renderers for use with Django REST Framework. It may be useful if you just want a CSV API and don't have a need for the pandas DataFrame functionality. * [mpld3] provides a direct bridge from [matplotlib] to [d3.js], complete with seamless [IPython] integration. It is restricted to the (large) matplotlib chart vocabularly but should be sufficient for many use cases. * [Bokeh] is a complete client-server visualization platform. It does not leverage d3 or Django, but is notable as a comprehensive, forward-looking approach to addressing similar use cases. The goal of Django REST Pandas is to provide a generic REST API for serving up pandas dataframes. In this sense, it is similar to the Plot Server in Bokeh, but more generic in that it does not assume any particular visualization format or technology. Further, DRP is optimized for integration with public-facing Django-powered websites (unlike mpld3 which is primarily intended for use within IPython). In summary, DRP is designed for use cases where: * You want to support live spreadsheet downloads as well as interactive visualizations, and/or * You want full control over the client visualization stack in order to integrate it with the rest of your website and/or build process. This usually means writing JavaScript code by hand. [mpld3] may be a better choice for data exploration if you are more comfortable with (I)Python and need something that can generate interactive visualizations out of the box. ## Supported Formats The following output formats are provided by default. These are provided as [renderer classes] in order to leverage the content type negotiation built into Django REST Framework. This means clients can specify a format via: * an HTTP "Accept" header (`Accept: text/csv`), * a format parameter (`/path?format=csv`), or * a format extension (`/path.csv`) The HTTP header and format parameter are enabled by default on every pandas view. Using the extension requires a custom URL configuration (see below). %prep %autosetup -n rest-pandas-1.1.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-rest-pandas -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot - 1.1.0-1 - Package Spec generated