{"id":776,"library":"linkify-it-py","title":"Linkify-it-py: Unicode-aware Link Recognition","description":"Linkify-it-py is a Python port of the popular JavaScript library 'linkify-it', designed for robust links recognition with full Unicode support. It excels at high-quality link pattern detection in plain text, accommodating international domains and astral characters. The library provides flexibility for extending its rules and implementing custom normalizers. As of March 2026, the current stable version is 2.1.0, and it maintains an active release cadence.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/tsutsu3/linkify-it-py","tags":["linkification","parser","unicode","autolink","text processing"],"install":[{"cmd":"pip install linkify-it-py","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Required for Unicode character processing and classification.","package":"uc-micro-py","optional":false}],"imports":[{"symbol":"LinkifyIt","correct":"from linkify_it import LinkifyIt"}],"quickstart":{"code":"from linkify_it import LinkifyIt\n\n# Initialize linkifier with default schemas (http, https, ftp, mailto, fuzzy links)\nlinkify = LinkifyIt()\n\ntext1 = \"Visit our site: github.com!\"\nmatches1 = linkify.match(text1)\nprint(f\"Text: '{text1}'\")\nfor match in matches1:\n    print(f\"  Matched: '{match.raw}' at index {match.index}-{match.last_index}, URL: {match.url}\")\n\ntext2 = \"Email me at user@example.com or check //example.net/path\"\nmatches2 = linkify.match(text2)\nprint(f\"\\nText: '{text2}'\")\nfor match in matches2:\n    print(f\"  Matched: '{match.raw}' at index {match.index}-{match.last_index}, URL: {match.url}\")\n\n# Example with custom options\nfrom linkify_it.tlds import TLDS\nlinkify_custom = (\n    LinkifyIt()\n    .tlds(TLDS) # Reload with full official TLDs list\n    .tlds(\"onion\", True) # Add unofficial .onion domain\n    .add(\"git:\", \"http:\") # Treat 'git:' as an alias for 'http:'\n    .set({\"fuzzy_ip\": True}) # Enable IPs in fuzzy links (without schema)\n)\n\ntext3 = \"Check out git:repo.git or a fuzzy IP 192.168.1.1/admin\"\nmatches3 = linkify_custom.match(text3)\nprint(f\"\\nText: '{text3}' (custom linkify)\")\nfor match in matches3:\n    print(f\"  Matched: '{match.raw}' at index {match.index}-{match.last_index}, URL: {match.url}\")","lang":"python","description":"This quickstart demonstrates basic linkification using `LinkifyIt` with default settings, showing how to test for and extract link matches. It also includes an example of customizing the linkifier by adding TLDs, protocol aliases, and enabling fuzzy IP detection."},"warnings":[{"fix":"Thoroughly test existing linkification logic after upgrading to `v2.x.x`. Pay attention to how punctuation and boundary conditions are handled, especially if your application relied on specific behaviors in `v1.x.x`.","message":"Version 2.0.0 introduced significant changes, including the addition of `matchAtStart` and fixes for paired symbols. While not all API changes were explicitly marked as breaking in `linkify-it-py`'s changelog, a major version bump indicates potential behavioral shifts that may affect applications relying on specific older parsing behaviors. Reviewing release notes is advised for upgrades from `v1.x.x`.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure your project's Python environment is 3.10 or newer before installing `linkify-it-py`. Upgrade your Python interpreter if necessary.","message":"The library explicitly requires Python 3.10 or higher. Attempting to install or run `linkify-it-py` on older Python versions (e.g., 3.9 or earlier) will result in installation failures or runtime errors due to `Requires-Python` metadata.","severity":"gotcha","affected_versions":"<2.1.0 (and potentially future versions for new Python minimums)"},{"fix":"Consult the documentation to understand the default schemas and options. Use `add()` method only for new, custom schemas or to override/disable existing ones. For example, `linkify.add('ftp:', None)` disables the FTP protocol.","message":"By default, `LinkifyIt()` is initialized with predefined schemas for `http(s)://`, `ftp://`, `mailto:`, `//` (protocol-neutral), as well as 'fuzzy' links (like `example.com`) and email addresses. Users sometimes mistakenly try to re-add these default schemas, which is unnecessary and can lead to unexpected behavior if custom rules conflict.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-05-12T18:54:15.243Z","next_check":"2026-06-27T00:00:00.000Z","problems":[{"fix":"Correct the import statement to `from linkify_it import LinkifyIt`.","cause":"The `linkify-it-py` package was installed, but the import statement used an incorrect module name, such as `linkify-it-py` or `linkify_it_py`, instead of the correct `linkify_it`.","error":"ModuleNotFoundError: No module named 'linkify_it'"},{"fix":"Install the `linkify-it-py` library using pip: `pip install linkify-it-py`.","cause":"This error occurs when using a dependent library like `markdown-it-py` or `myst-parser` with its linkify functionality enabled, but the `linkify-it-py` library, which provides this feature, has not been installed in the environment.","error":"ModuleNotFoundError: Linkify enabled but not installed."},{"fix":"Refer to the `linkify-it-py` official documentation and use the correct methods provided by the `LinkifyIt` object, such as `linkify.match(text)` to retrieve matches or `linkify.test(text)` for a boolean check.","cause":"The user is attempting to call a method that does not exist on the `LinkifyIt` instance, likely due to a misunderstanding of the library's API. For example, trying to call `linkify.find_links()` instead of the correct `linkify.match()` or `linkify.test()`.","error":"AttributeError: 'LinkifyIt' object has no attribute 'some_non_existent_method'"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":80,"quickstart_tag":"verified","pypi_latest":"2.1.0","cli_name":"linkify-it-py","cli_version":"sh: 1: linkify-it-py: not found","install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","installed_version":null,"pypi_latest":"2.1.0","is_stale":null,"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"18.1M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"18.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":1.5,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"19M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"19.9M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"19.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":1.6,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"20M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"20M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"11.8M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"11.8M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":1.5,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"12M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"11.5M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"11.4M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":1.5,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"12M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"17.6M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"17.6M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":null,"install_time_s":1.8,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"18M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"linkify-it-py","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.3,"disk_size":"18M"}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":"verified","tag_description":"quickstart runs on critical runtimes, recently tested","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}