{"id":300,"library":"mdurl","title":"mdurl","description":"mdurl is a Python port of the JavaScript mdurl package, providing utilities for parsing, encoding, and decoding URLs in Markdown. The latest version is 0.1.2, released on August 14, 2022. The project has a stable release history with no recent updates.","status":"active","version":"0.1.2","language":"python","source_language":"en","source_url":"https://github.com/executablebooks/mdurl","tags":["markdown","URL","parsing","encoding","decoding"],"install":[{"cmd":"pip install mdurl","lang":"bash","label":"Install mdurl"}],"dependencies":[],"imports":[{"note":"Incorrect import path; use direct import from mdurl.","wrong":"import mdurl.encode","symbol":"encode","correct":"from mdurl import encode"},{"note":"Incorrect import path; use direct import from mdurl.","wrong":"import mdurl.decode","symbol":"decode","correct":"from mdurl import decode"},{"note":"Incorrect import path; use direct import from mdurl.","wrong":"import mdurl.parse","symbol":"parse","correct":"from mdurl import parse"},{"note":"Incorrect import path; use direct import from mdurl.","wrong":"import mdurl.format","symbol":"format","correct":"from mdurl import format"}],"quickstart":{"code":"from mdurl import encode, decode, parse, format\n\n# Encode a URL\nencoded_url = encode('https://example.com/path?query=param')\nprint(f'Encoded URL: {encoded_url}')\n\n# Decode a URL\ndecoded_url = decode(encoded_url)\nprint(f'Decoded URL: {decoded_url}')\n\n# Parse a URL\nparsed_url = parse('https://example.com/path?query=param')\nprint(f'Parsed URL: {parsed_url}')\n\n# Format a parsed URL\nformatted_url = format(parsed_url)\nprint(f'Formatted URL: {formatted_url}')","lang":"python","description":"Demonstrates encoding, decoding, parsing, and formatting URLs using mdurl."},"warnings":[{"fix":"Manually normalize URLs before processing if necessary.","message":"mdurl functions do not perform URL normalization; ensure input URLs are properly formatted.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Validate URLs before decoding to handle invalid sequences appropriately.","message":"Invalid percent-encoded sequences are left as-is during decoding.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.1.2':26 '14':30 '2022':31 'august':29 'decod':18,47 'encod':16,46 'histori':38 'javascript':9 'latest':23 'markdown':21,43 'mdurl':1,2,10 'packag':11 'pars':15,45 'port':6 'project':33 'provid':12 'python':5 'recent':41 'releas':27,37 'stabl':36 'updat':42 'url':19,44 'util':13 'version':24","created_at":"2026-03-28T08:20:59.760413+00:00","updated_at":"2026-04-16T16:29:05.011544+00:00","problems":[{"fix":"Install the package using pip: `pip install mdurl`","cause":"The 'mdurl' package is not installed in the Python environment where the code is being run.","error":"ModuleNotFoundError: No module named 'mdurl'"},{"fix":"Refer to the `mdurl` documentation. The primary encoding function is `mdurl.encode()` and the decoding function is `mdurl.decode()`.","cause":"The user is attempting to call a function that does not exist in the `mdurl` library, possibly confusing its API with other URL parsing libraries like `urllib.parse` or the original JavaScript `mdurl`.","error":"AttributeError: module 'mdurl' has no attribute 'quote'"},{"fix":"Ensure that the input provided to `mdurl.encode()` or `mdurl.decode()` is a string.","cause":"The `mdurl.encode()` or `mdurl.decode()` function received an argument that is not a string, but an integer (or another non-string type) instead.","error":"TypeError: argument 's' must be str, not int"},{"fix":"Validate and ensure that the URL string passed to `mdurl.parse()` or other functions has a reasonably well-formed structure, including the correct scheme (e.g., `http://`, `https://`).","cause":"While `mdurl.parse()` is designed to be lenient, if the input URL string is severely malformed, particularly regarding its scheme or structure (e.g., `https:/example.com` instead of `https://example.com`), it can lead to unexpected parsing results or a `ValueError` if subsequent operations on the parsed object assume a valid structure.","error":"ValueError: Malformed URL scheme"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"quickstart_score":80,"quickstart_tag":"verified","pypi_latest":"0.1.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/executablebooks/mdurl","docs":null,"changelog":null,"pypi":"https://pypi.org/project/mdurl/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":"verified"}}