PelicanAdapter

class requests_pelican.PelicanAdapter(federation=None, max_retries=3, **kwargs)[source]

Bases: HTTPAdapter

HTTPAdapter for Pelican federation URLs.

This adapter handles accessing and caching the redirect links that the Pelican director supplies for each namespace, to transform a Pelican federation URI into an HTTP(S) URL.

Parameters

federationstr, optional

The name or URL of the Pelican federation to use.

max_retriesint, optional

The number of Pelican caches to try for each request. Default is 3.

Methods Summary

send(request[, stream, timeout, verify, ...])

Send a request using this adapter.

Methods Documentation

send(request, stream=False, timeout=60, verify=True, cert=None, proxies=None, federation=None)[source]

Send a request using this adapter.

This will loop over the Pelican cache URLs in an attempt to download the requested URI.