yarl
Python Software Foundation
Free
All components of a URL, including scheme, user, password, host, port, path, query, and fragment, can be accessed through their respective properties. Every manipulation of a URL results in a newly generated URL object, and the strings provided to the constructor or modification functions are automatically encoded to yield a canonical format. While standard properties return percent-decoded values, the raw_ variants should be used to obtain encoded strings. A human-readable version of the URL can be accessed using the .human_repr() method. Binary wheels for yarl are available on PyPI for operating systems such as Linux, Windows, and MacOS. In cases where you wish to install yarl on different systems like Alpine Linux—which does not comply with manylinux standards due to the absence of glibc—you will need to compile the library from the source using the provided tarball. This process necessitates having a C compiler and the necessary Python headers installed on your machine. It is important to remember that the uncompiled, pure-Python version is significantly slower. Nevertheless, PyPy consistently employs a pure-Python implementation, thus remaining unaffected by performance variations. Additionally, this means that regardless of the environment, PyPy users can expect consistent behavior from the library.