urlparse2 An enhanced, drop-in replacement for Python's urlparse module. Enhancements include: Mutable ParseResult fields Error handling for invalid domains passed to urljoin