Current collected state Current
Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
URL parser and manipulator based on the WHAT WG URL standard
ada-url
========
This is ``ada_url``, a fast standard-compliant Python library for working with URLs based on the ``Ada`` URL
parser.
* `Documentation <https://ada-url.readthedocs.io>`__
* `Development <https://github.com/ada-url/ada-python/>`__
* `Ada <https://www.ada-url.com/>`__
Installation
------------
Install from `PyPI <https://pypi.org/project/ada-url/>`__:
.. code-block:: sh
pip install ada_url
Usage examples
--------------
Parsing URLs
^^^^^^^^^^^^
The ``URL`` class is intended to match the one described in the
`WHATWG URL spec <https://url.spec.whatwg.org/#url-class>`_.
.. code-block:: python
>>> from ada_url import URL
>>> urlobj = URL('https://example.org/path/../file.txt')
>>> urlobj.href
'https://example.org/path/file.txt'
The ``parse_url`` function returns a dictionary of all URL elements:
.. code-block:: python
>>> from ada_url import parse_url
>>> parse_url('https://user:pass@example.org:80/api?q=1#2')
{
'href': 'https://user:pass@example.org:80/api?q=1#2',
'username': 'user',
'password': 'pass',
'protocol': 'https:',
'port': '80',
'hostname': 'example.org',
'host': 'example.org:80',
'pathname': '/api',
'search': '?q=1',
'hash': '#2',
'origin': 'https://example.org:80',
'host_type': <HostType.DEFAULT: 0>,
'scheme_type': <SchemeType.HTTPS: 2>
}
Altering URLs
^^^^^^^^^^^^^
Replacing URL components with the ``URL`` class:
.. code-block:: python
>>> from ada_url import URL
>>> urlobj = URL('https://example.org/path/../file.txt')
>>> urlobj.host = 'example.com'
>>> urlobj.href
'https://example.com/file.txt'
Replacing URL components with the ``replace_url`` function:
>>> from ada_url import replace_url
>>> replace_url('https://example.org/path/../file.txt', host='example.com')
'https://example.com/file.txt'
Search parameters
^^^^^^^^^^^^^^^^^
The ``URLSearchParams`` class is intended to match the one described in the
`WHATWG URL spec <https://url.spec.whatwg.org/#interface-urlsearchparams>`__.
.. code-block:: python
>>> from ada_url import URLSearchParams
>>> obj = URLSearchParams('key1=value1&key2=value2')
>>> list(obj.items())
[('key1', 'value1'), ('key2', 'value2')]
The ``parse_search_params`` function returns a dictionary of search keys mapped to
value lists:
.. code-block:: python
>>> from ada_url import parse_search_params
>>> parse_search_params('key1=value1&key2=value2')
{'key1': ['value1'], 'key2': ['value2']}
Internationalized domain names
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``idna`` class can encode and decode IDNs:
.. code-block:: python
>>> from ada_url import idna
>>> idna.encode('Bücher.example')
b'xn--bcher-kva.example'
>>> idna.decode(b'xn--bcher-kva.example')
'bücher.example'
WHATWG URL compliance
---------------------
This library is compliant with the WHATWG URL spec. This means, among other things,
that it properly encodes IDNs and resolves paths:
.. code-block:: python
>>> from ada_url import URL
>>> parsed_url = URL('https://www.GOoglé.com/./path/../path2/')
>>> parsed_url.hostname
'www.xn--googl-fsa.com'
>>> parsed_url.pathname
'/path2/'
Contrast that with the Python standard library's ``urllib.parse`` module, which loosely
follows the older `RFC 3978 <https://datatracker.ietf.org/doc/html/rfc3978>`__ standard:
.. code-block:: python
>>> from urllib.parse import urlparse
>>> parsed_url = urlparse('https://www.GOoglé.com/./path/../path2/')
>>> parsed_url.hostname
'www.googlé.com'
>>> parsed_url.path
'/./path/../path2/'
Performance
-----------
This package uses `CFFI <https://github.com/ada-url/ada-python/>`__ to call
the ``Ada`` C library's functions, which makes it faster than the Python standard
library's ``urllib.parse`` module for most applications.
An alternative package, `can_ada <https://github.com/tktech/can_ada>`__, uses
`pybind11 <https://pybind11.readthedocs.io/en/stable/>`__ to interact with the ``Ada``
C++ library functions, which is even faster.
pypistats · 90 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-19 – 2026-10-19 | 28,654 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-18 – 2026-10-18 | 9,650 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-17 – 2026-10-17 | 9,728 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-16 – 2026-10-16 | 21,321 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-15 – 2026-10-15 | 23,982 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-14 – 2026-10-14 | 28,548 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-13 – 2026-10-13 | 28,830 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-12 – 2026-10-12 | 14,397 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-11 – 2026-10-11 | 6,395 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-10 – 2026-10-10 | 6,213 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-09 – 2026-10-09 | 18,225 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-08 – 2026-10-08 | 24,954 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-07 – 2026-10-07 | 24,255 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-06 – 2026-10-06 | 25,455 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-05 – 2026-10-05 | 15,346 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-04 – 2026-10-04 | 6,217 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-03 – 2026-10-03 | 5,623 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-02 – 2026-10-02 | 17,157 | 2026-10-20T19:41:40.8039656Z |
| 2026-10-01 – 2026-10-01 | 18,314 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-30 – 2026-09-30 | 15,857 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-29 – 2026-09-29 | 16,028 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-28 – 2026-09-28 | 14,213 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-27 – 2026-09-27 | 6,145 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-26 – 2026-09-26 | 6,726 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-25 – 2026-09-25 | 19,819 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-24 – 2026-09-24 | 18,892 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-23 – 2026-09-23 | 19,154 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-22 – 2026-09-22 | 18,022 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-21 – 2026-09-21 | 12,912 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-20 – 2026-09-20 | 3,449 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-19 – 2026-09-19 | 7,671 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-18 – 2026-09-18 | 17,399 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-17 – 2026-09-17 | 17,862 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-16 – 2026-09-16 | 16,037 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-15 – 2026-09-15 | 20,015 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-14 – 2026-09-14 | 16,652 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-13 – 2026-09-13 | 3,702 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-12 – 2026-09-12 | 5,221 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-11 – 2026-09-11 | 18,066 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-10 – 2026-09-10 | 15,394 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-09 – 2026-09-09 | 15,984 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-08 – 2026-09-08 | 28,696 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-07 – 2026-09-07 | 18,514 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-06 – 2026-09-06 | 15,481 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-05 – 2026-09-05 | 22,355 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-04 – 2026-09-04 | 24,623 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-03 – 2026-09-03 | 54,987 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-02 – 2026-09-02 | 24,189 | 2026-10-20T19:41:40.8039656Z |
| 2026-09-01 – 2026-09-01 | 22,923 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-31 – 2026-08-31 | 16,749 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-30 – 2026-08-30 | 3,945 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-29 – 2026-08-29 | 4,484 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-28 – 2026-08-28 | 14,334 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-27 – 2026-08-27 | 13,396 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-26 – 2026-08-26 | 13,239 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-25 – 2026-08-25 | 15,149 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-24 – 2026-08-24 | 17,642 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-23 – 2026-08-23 | 4,030 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-22 – 2026-08-22 | 7,632 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-21 – 2026-08-21 | 23,730 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-20 – 2026-08-20 | 24,683 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-19 – 2026-08-19 | 27,680 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-18 – 2026-08-18 | 29,525 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-17 – 2026-08-17 | 21,565 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-16 – 2026-08-16 | 4,347 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-15 – 2026-08-15 | 5,279 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-14 – 2026-08-14 | 17,194 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-13 – 2026-08-13 | 20,537 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-12 – 2026-08-12 | 17,871 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-11 – 2026-08-11 | 23,166 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-10 – 2026-08-10 | 21,843 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-09 – 2026-08-09 | 4,549 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-08 – 2026-08-08 | 6,393 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-07 – 2026-08-07 | 26,272 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-06 – 2026-08-06 | 17,146 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-05 – 2026-08-05 | 19,974 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-04 – 2026-08-04 | 21,211 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-03 – 2026-08-03 | 17,074 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-02 – 2026-08-02 | 3,149 | 2026-10-20T19:41:40.8039656Z |
| 2026-08-01 – 2026-08-01 | 7,320 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-31 – 2026-07-31 | 19,093 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-30 – 2026-07-30 | 15,995 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-29 – 2026-07-29 | 18,527 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-28 – 2026-07-28 | 22,371 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-27 – 2026-07-27 | 18,985 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-26 – 2026-07-26 | 4,675 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-25 – 2026-07-25 | 5,870 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-24 – 2026-07-24 | 13,991 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-23 – 2026-07-23 | 16,400 | 2026-10-20T19:41:40.8039656Z |
| 2026-07-22 – 2026-07-22 | 17,683 | 2026-10-20T19:41:40.8039656Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 4.0.0 | 28 Jul 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:22084b1f5460d17ba9442aa4f3bdaf456422ffe56448eb34d49b73eeb5116ce3