datacube.drivers.common_psql.create_user#

datacube.drivers.common_psql.create_user(conn, username, password, role, description=None)[source]#

Create a new database user with the specified role.

Parameters:
  • conn (Connection) – An SQLAlchemy connection object

  • username (str) – The username for the new user

  • password (str) – The password for the new user

  • role (UserRoleBase) – The role to assign the user

  • description (str | None) – A description of the user (optional)

Return type:

bool

Returns:

True on success, False on failure, including if the user already exists.