--- id: purl version: "1.6" license: MIT license_treatment: permissive maintenance: abandoned --- # purl — An immutable URL class for easy URL-building and manipulation License: permissive · Maintenance: abandoned · Downloads: 477.0K/mo ## What it is and what it does purl is a lightweight URL manipulation library that wraps Python's URL handling in an immutable, fluent API. You construct URLs from strings or keyword arguments, then interrogate or mutate them through chainable methods—each mutation returns a new instance, so URLs can safely be used as dictionary keys or pickled. The library also implements RFC 6570 URI template expansion for dynamic URL generation. Typical use is building query strings, extracting URL components, or transforming URLs step-by-step without managing raw strings. It has no runtime dependencies and was designed to work across Python 2.7 and Python 3 versions, though the project has not been actively maintained since its latest release on 2021-05-15. Use it for: - Build query strings and URLs programmatically without string concatenation or manual encoding. - Extract and manipulate URL components (scheme, host, path, query params) with a readable API. - Use URLs as dictionary keys or in sets, since instances are immutable and hashable. - Expand RFC 6570 URI templates with variable substitution for dynamic endpoint construction. - Parse and modify existing URLs while preserving structure and handling special characters. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides an immutable, chainable URL class for constructing, parsing, and manipulating URLs with a clean API, plus support for RFC 6570 URI template expansion. Yes, if you need lightweight URL manipulation without dependencies and can accept that the project is no longer maintained. The API is clean and the library is stable for basic URL building and parsing. No, if you require active maintenance, security updates, or support for the latest Python features—consider urllib.parse for standard library alternatives or a more actively maintained URL library. ## Install pip install purl uv add purl poetry add purl ## Installing purl Before you install: Installation is straightforward with no runtime dependencies. The project is marked abandoned with the last commit in 2023, so expect no active maintenance or security updates. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: from purl import URL u = URL('https://www.google.com/search?q=testing') print(u.query_param('q')) # 'testing' new_url = u.path('/new').query_param('q', 'updated') print(new_url.as_string()) Verify before relying: - Whether the package remains compatible with Python versions released after 2021. - Whether RFC 6570 template expansion handles all edge cases in modern use. - Current stability and real-world usage patterns given the abandoned maintenance status. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 477.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags URL parsing and building, immutable URL class, query parameter manipulation, URI template expansion, URL construction API, RFC 6570 templates, URL interrogation, url-manipulation, immutable-data, uri-templates [View on SkillFed](https://skillfed.io/packages/purl) · [View on PyPI](https://pypi.org/project/purl/)