{"id":24797,"library":"urlpy","title":"urlpy","description":"Simple URL parsing, canonicalization and equivalence library for Python. Current version 0.5, stable but rarely updated.","status":"maintenance","version":"0.5","language":"python","source_language":"en","source_url":"https://github.com/nexB/urlpy","tags":["url","parsing","canonicalization","python"],"install":[{"cmd":"pip install urlpy","lang":"bash","label":"default"}],"dependencies":[],"imports":[{"note":"The top-level module does not expose URL directly; must use from import.","wrong":"import urlpy","symbol":"URL","correct":"from urlpy import URL"}],"quickstart":{"code":"from urlpy import URL\nu = URL('http://example.com/foo?bar=baz')\nprint(u.scheme, u.host, u.path)\nprint(u.canonicalize())","lang":"python","description":"Parse, access components, and canonicalize a URL."},"warnings":[{"fix":"Use u.canonicalize() or create a new URL() for modifications.","message":"URL objects are mutable. Modifying attributes like u.scheme affects the original object.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using 'yarl' or 'urllib.parse' for active development.","message":"The library is in maintenance mode; no new features are added. May not be compatible with newer Python versions beyond 3.10.","severity":"deprecated","affected_versions":">=0.5"},{"fix":"Manually sort query params if needed: u.query = '&'.join(sorted(u.query.split('&')))","message":"Canonicalization may lowercases the scheme and host, but does not sort query parameters.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from urlpy import URL'","cause":"Using 'import urlpy' instead of 'from urlpy import URL'","error":"AttributeError: module 'urlpy' has no attribute 'URL'"},{"fix":"Use attribute assignment like u.scheme = 'https'","cause":"Trying to modify a URL property by index instead of attribute","error":"TypeError: 'URL' object does not support item assignment"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}