1
1
ada-url
2
2
========
3
3
4
- The `urlib.parse ` module in Python does not follow the legacy RFC 3978 standard nor
5
- does it follow the newer WHATWG URL specification. It is also relatively slow.
6
-
7
4
This is ``ada_url ``, a fast standard-compliant Python library for working with URLs based on the ``Ada `` URL
8
5
parser.
9
6
@@ -127,7 +124,8 @@ that it properly encodes IDNs and resolves paths:
127
124
>> > parsed_url.pathname
128
125
' /path2/'
129
126
130
- Contrast that with the Python standard library's ``urlib.parse `` module:
127
+ Contrast that with the Python standard library's ``urllib.parse `` module, which loosely
128
+ follows the older `RFC 3978 <https://datatracker.ietf.org/doc/html/rfc3978 >`__ standard:
131
129
132
130
.. code-block :: python
133
131
@@ -138,11 +136,13 @@ Contrast that with the Python standard library's ``urlib.parse`` module:
138
136
>> > parsed_url.path
139
137
' /./path/../path2/'
140
138
141
- Alternative Python bindings
142
- ---------------------------
139
+ Performance
140
+ -----------
143
141
144
142
This package uses `CFFI <https://github.com/ada-url/ada-python/ >`__ to call
145
- the ``Ada `` library's functions, which has a performance cost.
146
- The alternative `can_ada <https://github.com/tktech/can_ada >`__ (Canadian Ada)
147
- package uses `pybind11 <https://pybind11.readthedocs.io/en/stable/ >`__ to generate a
148
- Python extension module, which is more performant.
143
+ the ``Ada `` C library's functions, which makes it faster than the Python standard
144
+ library's ``urllib.parse `` module for most applications.
145
+
146
+ An alternative package, `can_ada <https://github.com/tktech/can_ada >`__, uses
147
+ `pybind11 <https://pybind11.readthedocs.io/en/stable/ >`__ to interact with the ``Ada ``
148
+ C++ library functions, which is even faster.
0 commit comments