Bypass DBMS root interactive prompt by passing values in options

in the following link : bench restore
you mentioned the following command to restore site

bench --site {site} restore {path/to/database/file}
   --db-root-username {db-user}
   --db-root-password {db-pass}

How can I apply this, please give example because I don’t want to enter mariadb password when prompted, I want to embed in the code