requests-pelican

requests-pelican provides a Requests plugin to support HTTP requests to a Pelican Federation.

The main component is a new PelicanAdapter class that handles translating Pelican URIs into HTTP URLs to enable standard GET requests, including looping over Pelican caches.

This project also provides wrappers around requests.get (and friends) and requests.Session to simplify configuring support for Pelican URIs.

requests-pelican PyPI version badge requests-pelican conda-forge badge
requests-pelican license badge Supported Python versions badge
Build status Code coverage Documentation Status

Installation

Conda

conda install -c conda-forge requests-pelican

Pip

python -m pip install requests-pelican

To include support for [SciTokens](https://scitokens.org/) include the [scitokens] extra:

python -m pip install requests-pelican[scitokens]

requests-pelican documentation

Python Requests addon to support accessing data from a Pelican federation.

See https://docs.pelicanplatform.org/ for details of the Pelican platform.

Functions

delete(url, **kwargs)

Sends a DELETE request.

get(url[, params])

Sends a GET request.

get_urls(path[, federation, cache, timeout, ...])

Return the list of fully-qualified URLs that serve the given path.

head(url, **kwargs)

Sends a HEAD request.

patch(url[, data])

Sends a PATCH request.

post(url[, data, json])

Sends a POST request.

put(url[, data])

Sends a PUT request.

request(method, url, **kwargs)

Constructs and sends a Request.

Classes

DirectorResponse(federation, namespace[, ...])

Information for a Pelican namespace.

PelicanAdapter([federation, max_retries])

HTTPAdapter for Pelican federation URLs.

Session(*args, **kwargs)

requests.Session that understands Pelican URIs.

Modules

requests_pelican.config

Pelican configuration interactions.

requests_pelican.director

Pelican federation director interactions.

requests_pelican.federation

Pelican federation interactions.

requests_pelican.utils

Utilities for requests-pelican.