from urllib.parse import urlparse


def is_valid_url(url: str) -> bool:
    """Return True if url has an http/https scheme and a non-empty host."""
    parsed = urlparse(url)
    return parsed.scheme in ("http", "https") and bool(parsed.netloc)
