Skip to content

Latest commit

History

History
75 lines (54 loc) 路 1.81 KB

api.rst

File metadata and controls

75 lines (54 loc) 路 1.81 KB

Hyperlink API

hyperlink._url

Creation

Before you can work with URLs, you must create URLs. There are two ways to create URLs, from parts and from text.

hyperlink.URL

hyperlink.URL.from_text

Transformation

Once a URL is created, some of the most common tasks are to transform it into other URLs and text.

hyperlink.URL.to_text

hyperlink.URL.to_uri

hyperlink.URL.to_iri

hyperlink.URL.replace

hyperlink.URL.normalize

Navigation

Go places with URLs. Simulate browser behavior and perform semantic path operations.

hyperlink.URL.click

hyperlink.URL.sibling

hyperlink.URL.child

Query Parameters

CRUD operations on the query string multimap.

hyperlink.URL.get

hyperlink.URL.add

hyperlink.URL.set

hyperlink.URL.remove

Attributes

URLs have many parts, and URL objects have many attributes to represent them.

hyperlink.URL.absolute

hyperlink.URL.scheme

hyperlink.URL.host

hyperlink.URL.port

hyperlink.URL.path

hyperlink.URL.query

hyperlink.URL.fragment

hyperlink.URL.userinfo

hyperlink.URL.user

hyperlink.URL.rooted

hyperlink.URL.family

Low-level functions

A couple of notable helpers used by the ~hyperlink.URL type.

hyperlink.URLParseError

hyperlink.register_scheme

hyperlink.parse_host