get_director_response¶
- requests_pelican.director.get_director_response(path, federation=None, *, cache=True, timeout=60, **kwargs)[source]¶
Query for director information for a Pelican 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¶
- dirresp
DirectorResponse The response from the Pelican director.
- path