How to get doctype fields?

Hello community , is there a method I can get all doctype fields in a list ? like [“name”,“creation”,…]
it’s like all keys of doctype .

Perhaps from a terminal try bench mariadb, then show columns from <tableName>; Example: show columns from tabItem;

Also in ERPNext, search Doctype list, select the doctype and the fields will list though that may not be the format you wish to see. There are other mysql/mariadb reporting tools if you need something more pretty.

Maybe in python you can do frappe.get_all(‘DocTypeName’) and get all the fields.