Create new DocTypes by importing csv file

Is it possible to create a new DocType by importing a CSV file?

Or is there any other way that can help me save time when I want to create a long DocType?

@deepakshi,

I you can create a python script using GitHub - frappe/frappe-client: Python library to use Frappe API let it read the csv the create your doctype.

Chris
Bai Web and Mobile Labs
https://bai.ph

@ccfiel

Thanks Chris. Is there any other way is which I can create a doctype faster, except for the csv file route?

you can use the data import tool

check the following https://frappe.github.io/erpnext/user/manual/en/setting-up/data/data-import-tool

Thanks, Makarand

Hi Makarand, Thank for your reply.

Is it possible to create a copy of a doctype across environments. Eg: If I work on 2 environments, say staging.erpnext.com and production.erpnext.com, I created a doctype on staging.erpnext.com. Now, I want to create the same doctype on production.erpnext.com. Could you suggest some faster ways, which do not require me to re-create the doctype?

Start using Version control system such as git or you can simply use Gitlab / Github and push your customizations to staging repository and merging tested one to master/production (whatever you name it) in git.

Then with git pull all changes can be rolled out in a snap!