pdgrid 0.1.3

Last updated:

0 purchases

pdgrid 0.1.3 Image
pdgrid 0.1.3 Images
Add to Cart

Description:

pdgrid 0.1.3

A higly performant back end for AG-Grid front end.
This API is written to deliver fast responses to requests from a grid front end client on data sets that are too big to be effectively transformed on the front end.
The ag-grid endpoint takes a Pandas dataframe and the corresponding ag-grid request and performs the transformations to the dataframe specified in the request, returning a dictionary formatted as expected by ag-grid.
The source code is available here
Performance
When benchmarked against a purpose-built Java server PDGrid generally outperformed Java. In some cases by a large factor, depending on the size of the data set. Pandas is extremely performant when performing grouping, aggregation, filtering and sorting commands. The biggest bottleneck in most cases will be the loading of the data from db or otherwise. By caching the data in Apache Parquet format this can be speeded up significantly (see example here).
Supported ag-grid features
Pivoting, Pagination, Grouping, Sorting, Aggregrations, Filtering, Asynchronous fetching of set filter values.
Requirements
Python 3.8 or 3.9.
Installation:
From source:
$ git clone [email protected]:slindal/pdgrid.git
$ cd pdgrid
$ python3.9 -m venv env
$ . env/bin/activate
$ python setup.py install

Using package manager (in a python3 venv):
$ python -m pip install pdgrid

Running a test server
Set up mysql database and add a table:
$ cd examples
$ msyql -u root
$ mysql> create database sample_data;
$ mysql> source ./create_athletes.sql;

Install the python packages needed to run the server:
$ python -m pip install -r server_requirements.txt

Finally start up the server (from example directory):
$ export FLASK_APP=server
$ python -m flask run --port=8000

If you have started up a front end client (follow these steps you should be able to see the data set http://localhost:4000
Using other data
No changes are necessary on the server side, beyond changing the function that loads the data from database or elsewhere. The front end client must be updated to handle any changes to the data set.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.