I want a certain user roles to be created when the app is installed. how can i do that
Hello @DineshLiyanage,
Have a look at Fixtures under hooks in frappe documentation. For example, see the fixture in gameplan app here.
Also have a look at install.py in LMS app. You can see custom roles needed for LMS being created at the time of setup and deleted at the time of uninstallation of the app.