skillfed

can-ada

Ada is a fast spec-compliant url parser

can-ada v3.0.0 132.4K downloads/30d#11,553 on PyPI142
Permissive license MIT AGING released

What it is and what it does

can_ada is a Python binding to Ada, a WHATWG-compliant URL parser written in C++. It parses URLs and query strings according to the official web standard, which differs from Python's urllib.parse in handling internationalized domain names, path normalization, and other edge cases. The package provides a parse() function that returns a URL object with properties like hostname, pathname, protocol, and search, plus a URLSearchParams class for manipulating query parameters. It has no runtime dependencies and is distributed as precompiled wheels for most platforms.

The main value proposition is speed—the documentation shows it performs roughly 4x faster than urllib.parse on typical workloads—combined with standards compliance. It's useful when you need correct URL parsing according to web specifications rather than Python's historical behavior, or when URL parsing is a performance bottleneck. Installation requires a C++17 compiler if a wheel is not available for your platform.

Use it for:

  • Parsing and normalizing URLs in web scrapers or HTTP clients where WHATWG compliance matters
  • Building URL manipulation tools that need to correctly handle internationalized domain names and path normalization
  • High-throughput URL processing where the 4x performance gain over urllib justifies the dependency
  • Handling query parameters with the URLSearchParams API when multiple values per key are needed
  • Migrating from Node.js or browser-based URL parsing to Python while maintaining identical behavior

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses and manipulates URLs according to the WHATWG specification, offering a faster alternative to Python's standard urllib.parse with support for URL modification and query parameter handling.

Yes, if you need WHATWG-compliant URL parsing or are performance-sensitive on URL operations. The MIT license, lack of runtime dependencies, and active maintenance make it low-risk. Install only if standard urllib.parse behavior is insufficient or speed is critical; otherwise urllib is built-in and adequate.

Install

can-ada on PyPI

pip

pip install can-ada

uv

uv add can-ada

poetry

poetry add can-ada

Installing can-ada

Before you install

Medium install friction due to C++17 compilation requirement when wheels are unavailable, though binary wheels cover most common platforms. The package is actively maintained with recent releases and no known vulnerabilities.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install can_ada

from can_ada import parse, URLSearchParams

url = parse("https://example.com/path?q=test")
print(url.hostname)  # example.com
print(url.pathname)  # /path

params = URLSearchParams("q=test&page=1")
params.append("page", "2")
print(params.get_all("page"))  # [1, 2]

C++17 compiler required if a precompiled wheel is unavailable for your platform; requires Python 3.9 or later

Verify before relying

  • Whether the ~4x performance improvement over urllib holds across different URL patterns and workloads beyond the benchmark shown
  • Compatibility with edge cases in URL parsing beyond the WHATWG spec examples provided

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance aging — 198 days since the last release
Last repo commit
First released
Downloads 132,425/month — #11,553 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: can_ada-3.0.0-cp310-cp310-macosx_10_15_universal2.whl; can_ada-3.0.0-cp310-cp310-macosx_10_15_x86_64.whl; can_ada-3.0.0-cp310-cp310-macosx_11_0_arm64.whl; can_ada-3.0.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; can_ada-3.0.0-cp310-cp310-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; can_ada-3.0.0-cp310-cp310-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; can_ada-3.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; can_ada-3.0.0-cp310-cp310-musllinux_1_2_aarch64.whl; can_ada-3.0.0-cp310-cp310-musllinux_1_2_ppc64le.whl; can_ada-3.0.0-cp310-cp310-musllinux_1_2_s390x.whl; can_ada-3.0.0-cp310-cp310-musllinux_1_2_x86_64.whl; can_ada-3.0.0-cp310-cp310-win32.whl; can_ada-3.0.0-cp310-cp310-win_amd64.whl; can_ada-3.0.0-cp311-cp311-macosx_10_15_universal2.whl; can_ada-3.0.0-cp311-cp311-macosx_10_15_x86_64.whl; can_ada-3.0.0-cp311-cp311-macosx_11_0_arm64.whl; can_ada-3.0.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; can_ada-3.0.0-cp311-cp311-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; can_ada-3.0.0-cp311-cp311-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; can_ada-3.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Tags

WHATWG URL parserfast URL parsingURL parser libraryURL manipulationquery string parsingspec-compliant URLURLSearchParams
url-parsingwhatwg-specperformance-focused

More WWW/HTTP packages