hyperlink
20.0
  • Hyperlink Design
    • A Tale of Two Representations
    • Immutability
    • Query parameters
    • Origins and backwards-compatibility
  • Hyperlink API
    • Creation
      • Parsing Text
      • DecodedURL
      • The Encoded URL
    • Transformation
    • Navigation
    • Query Parameters
    • Attributes
    • Low-level functions
  • FAQ
    • Why not just use text?
    • How does Hyperlink compare to other libraries?
    • Are URLs really a big deal in 201X?
hyperlink
  • Docs »
  • Hyperlink API
  • View page source

Hyperlink API¶

  • Creation

    • Parsing Text

    • DecodedURL

    • The Encoded URL

  • Transformation

  • Navigation

  • Query Parameters

  • Attributes

  • Low-level functions

Creation¶

Before you can work with URLs, you must create URLs.

Parsing Text¶

If you already have a textual URL, the easiest way to get URL objects is with the parse() function:

By default, parse() returns an instance of DecodedURL, a URL type that handles all encoding for you, by wrapping the lower-level URL.

DecodedURL¶

The Encoded URL¶

The lower-level URL looks very similar to the DecodedURL, but does not handle all encoding cases for you. Use with caution.

Note

URL is also available as an alias, hyperlink.EncodedURL for more explicit usage.

Transformation¶

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

Navigation¶

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

Query Parameters¶

CRUD operations on the query string multimap.

Attributes¶

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

Low-level functions¶

A couple of notable helpers used by the URL type.

Next Previous

© Copyright 2021, Mahmoud Hashemi

Built with Sphinx using a theme provided by Read the Docs.