3.1. URLs

3.1.1. Url – saga.Url

class saga.Url(url_in='')[source]

Bases: radical.utils.url.Url

The SAGA Url class.

URLs are used in several places in the SAGA API: to specify service endpoints for job submission or resource management, for file or directory locations, etc.

The URL class is designed to simplify URL management for these purposes – it allows to manipulate individual URL elements, while ensuring that the resulting URL is well formatted. Example:

# create a URL from a string
location = saga.Url ("file://localhost/tmp/file.dat")
d = saga.filesystem.Directory(location)

A URL consists of the following components (where one ore more can be ‘None’):


Each of these components can be accessed via its property or alternatively, via getter / setter methods. Example:

url = saga.Url ("scheme://pass:user@host:123/path?query#fragment")

# modify the scheme
url.scheme = "anotherscheme"

# above is equivalent with