def _parse_database_uri(uri):
    """
    Parse a SQLAlchemy database URI.

    :param uri: Postgres URI
    :type uri: str
    :return: Dict filled with the URI information
    """
    db_engine = {}

    uri_parts = uri.split('://')
    db_engine['protocol'] = uri_parts[0]

    uri_without_protocol_parts = uri_parts[1].split('@')
    user_and_pass = uri_without_protocol_parts[0].split(':')
    domain_and_db = uri_without_protocol_parts[1].split('/')

    db_engine['username'] = user_and_pass[0]
    db_engine['password'] = user_and_pass[1]
    db_engine['host'] = domain_and_db[0].split(':')[0]
    db_engine['port'] = domain_and_db[0].split(':')[1]
    db_engine['database'] = domain_and_db[1]

    return db_engine