get_urls¶
- requests_pelican.get_urls(path, federation=None, *, cache=True, timeout=60, random=False, **kwargs)[source]¶
Return the list of fully-qualified URLs that serve the given path.
Parameters¶
- path
str The Pelican data path, must be a sub-path of the right namespace for this
DirectorResponse.- federation
str The name or URL of the Pelican Federation that contains the path. This is required if
pathisn’t a valid Pelican URI from which the federation URL can be parsed.- cache
bool,str Whether to use a cached copy of the
DirectorResponsefor the federation (TrueorFalse). Ifcache="update"is given, query the director again and update the cache with the new response.- timeout
int, optional The timeout (seconds) after which to abort requests to the Pelican director.
- random
bool If
True, shuffle the list of URLs before returning.- kwargs
Other keyword arguments are passed to
get_director_response.
Returns¶
See Also¶
- DirectorResponse.urls
For details of the URL formatting.
- path