Plotly Dash integration for Frappe and ERPNext

Hi,

I’ve created Plotly Dash integration apps for Frappe and ERPNext.

I’ve been using ERPNext for almost 2 years now, it’s a great ERP apps though it’s lack of dashboard feature.

Plotly Dash is a great dashboard tools which allow programmer to easily create interactive dashboard but it lack of general web feature such as authentication or user-permission.

Integrating Frappe web framework with Plotly Dash is result in great ERP app with powerful dashboard tools.

Feature

  • Dashboard template using CoreUI admin template
    Templating

  • Authentication from Frappe web framework
    Authentication

  • Dashboard permission using user roles from Frappe
    User Permission

  • Embedded Dash Dashboard into Frappe page

  • Access Frappe data from dash environment

Pros and Cons

Pros

  • Plotly Dash comes with a big Graphing Library
  • Plotly Dash is a really great dashboard tools
  • You can manipulate data using python then using that data in dashboard
  • It work well with multi tenant setup

Cons

  • There are no web UI to create dashboard, dashboard need to written in python

Repository

Any feedback or suggestions are welcome. :smile:


I’ve also created Metabase integration for Frappe and ERPNext.
Metabase is easy to use and easy to setup dashboard tools which comes with web-ui which make it easy create dashboard.

23 Likes

Whoa! And YES! Yes and yes! Thank you :smile:

Best of luck! Make sure you get enough sleep though :slight_smile:

is it possible for version-11 ?

Great work @pipech !!!

Hi,

It should work with version 11.

Any idea why I get Page Not found error? I followed all the steps (I think). The provided dashboard (Testing 1 and Testing 2) also are not found

1 Like

Hi,

Can you access dashboard page by going to http://localhost:8000/dash/dashboard?dash=Testing%201 ?

Hi @pipech,

Just installed the plotly dash integration but I am unable to find a way to actually load data into the dashboard.

I am able to access the dashboard page where I can select the testing dashboard but that page just shows the desk page.

I am unable to figure out how to connect the data and link it with the dashboard any help on this would be great since I can’t find any documentation for the same.

What would it take to integrate superset? It looks lighter than metabase (resource-wise)

Ah yes, I certainly vote for Apache Superset.

Currently, we use Superset, but externally. We simply connect it to the database, but it would be wonderful to have it integrated.

See this post Dashboard Options for ERPNext

Apache Superset Integration

Doing a superficial go through I think the approach to integrate would be along the same lines as was used for plotly. viz. using iframe integration

I plan to fork from here the Git repo above and muddle along.

Hi @pipech,

Is it possible in ERPNEXT 13?

Hi!, How you have connected the ERPNext’s database with apache superset?

Within the Superset GUI, you simply set up the Frappe/ERPNext MariaDB database as a data Source.

You can get the database detail from

cd ${sDirB} && bench --site ${sSite} show-config --format text

To get the mariadb user and pwd, Is this command need to be run on the frappe-bench?

The MariaDB user and password is what you used when set up your site.
You can get the other database detail from this bench command

bench --site YourSiteName show-config --format text

1 Like

Is there any possibility to find out my MariaDB user and Password?

Can you plse provide the dialect and driver you have used for the Mariadb connection with Superset?

Superset doesn’t ship with database connectors. For MariaDB you will need to install this first.
This is for the native installation. The Docker installation differs but I’ve never tried it, but believe it is easier.

> pip install SQLAlchemy
> pip install PyMySQL
> pip install apache-superset --upgrade
> superset db upgrade
> superset init

Set the following URI, which is set in

Superset > Sources > Databases > New > Database : <AnyName> URI : 
mysql+pymysql://<YourUserName>:<YourPassWord>@localhost:3306/<DatabaseName>

Followed the same steps, still not able to connect with Superset.