ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.PyPI.Request

Description

PyPI request paths, metadata negotiation and credentials over shared HTTP mechanics.

Synopsis

The ecosystem's artifact hosts

pypiArtifactHosts :: [Text] Source #

PyPI's files host, admitted alongside the registry host by the artifact gate.

Request building

simpleIndexRequest :: Text -> Maybe ClientCredential -> PackageName -> Either UrlFormationError Request Source #

Build the Simple-index GET for a project. It fails only on an empty or unparseable base URL.

artifactRequestByFile :: Text -> Maybe ClientCredential -> PackageName -> Text -> Either UrlFormationError Request Source #

Fetch {baseUrl}simple{canonical-name}/{filename} from a private index.

artifactRequestByUrl :: Maybe ClientCredential -> Text -> Either UrlFormationError Request Source #

Fetch the preserved files[].url under PyPI's credential presentation.

URL building

simpleIndexUrl :: Text -> PackageName -> Either UrlFormationError Text Source #

The Simple-index URL {baseUrl}/simple/{canonical-name}/.

artifactFileUrl :: Text -> PackageName -> Text -> Either UrlFormationError Text Source #

The artifact URL {baseUrl}/simple/{canonical-name}/{encoded-filename}.

artifactPath :: Text -> Text -> Text Source #

Encode each component of simple{canonical-project}{file} relative to the index root.