Is there a way to add system settings and website settings during custom app installation?

I am trying to set some system settings and website settings when my custom app is install. Can i use the install hooks for this, if so can you please give me an example?

In your custom app you can make script (js or py) to set_value or set_df_property of the targetted setting fields.

the solution works with the install hook but these doesn’t seem to work not even in bench console

frappe.db.set_value('System Settings', None , 'session_expiry', '01:00')
frappe.db.set_value('System Settings', None , 'session_expiry_mobile', '01:00')
frappe.db.commit()

but these work

frappe.db.set_value('System Settings', None , 'allow_consecutive_login_attempts', 10)
frappe.db.set_value('System Settings', None , 'allow_login_after_fail', 600)
frappe.db.set_value('Website Settings', None , 'disable_signup', 1)
frappe.db.commit()

It seems it gets set in the database, but when i go to system settings the session expiry is set to the last value set and is set to not saved.