@frappe.whitelist()
def install_app(name):
	frappe.only_for("System Manager")

	if name not in frappe.get_all_apps(True):
		if not frappe.conf.disallow_app_listing:
			get_app(name)
			frappe.cache().delete_value(["app_hooks"])
			# reload sys.path
			import site
			reload(site)
		else:
			# will only come via direct API
			frappe.throw("Listing app not allowed")

	app_hooks = frappe.get_hooks(app_name=name)
	if app_hooks.get('hide_in_installer'):
		frappe.throw(_("You cannot install this app"))

	frappe.publish_realtime("install_app_progress", {"status": _("Installing App {0}").format(name)},
		user=frappe.session.user)

	frappe.installer.install_app(name)

	frappe.publish_realtime("install_app_progress", {"status": _("{0} Installed").format(name)},
		user=frappe.session.user)
Walk the templates and generate output.
dataset/ETHPy150Open frappe/frappe/frappe/desk/page/applications/applications.py/install_app--crossover with--dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/expand_templates.py/TemplateExpander.GeneratePackage