deepcave.utils.url

# URL

This module creates and parses an URL according to its input information.

Functions

create_url(pathname, inputs)

Create an URL with the given pathname and inputs.

parse_url(pathname)

Parse the URL and extract input information if possible.

deepcave.utils.url.create_url(pathname, inputs)[source]

Create an URL with the given pathname and inputs.

Parameters:
  • pathname (str) – The name of the path for the URL.

  • inputs (Dict[str, Any]) – A dictionary containing the input parameters for the URL.

Returns:

The URL.

Return type:

str

deepcave.utils.url.parse_url(pathname)[source]

Parse the URL and extract input information if possible.

Parameters:

pathname (str) – The name of the URL.

Returns:

A dictionary with the extracted inputs if available. Otherwise return None.

Return type:

Optional[Dict[str, Any]]