How to add demo data in erpnext app?

Hello,

I want to add some demo data in my custom doctype at a time of installing my custom app in erpnext site.

So, How can I do this stuff?

Thank You.

use after_install or setup_wizard_complete event from hooks.py

https://frappe.github.io/frappe/user/en/guides/basics/hooks

But I have one JSON file contains the bulk of records for the doctype. (field name, value)
Now those records will create into the doctype when the app will install.

In this scenario, the same solution will work?

after_install - will run after the installation of an app.
setup_wizard_complete - will run after the setup wizard complete.

You have to write a method to create a record. which you can execute using any one of above hooks.