Skip to content
ocx
install

DistSource to Forge

EnvEntryTypeattribute#

Re-exported from ocx_sdk._resultsView source
EnvEntryType

The type an ocx env entry declares. Mirrors ocx’s --env KEY:TYPE=VALUE.

EnvValueattribute#

Re-exported from ocx_sdk._typesView source
EnvValue

An [env] value. A bare str is a ConstVar, matching ocx’s own grammar.

Forgeattribute#

Re-exported from ocx_sdk._clientView source
Forge

ocx --forge values — which forge hosts an index repository. Argv-only, so a Literal.

DistSourceclassdataclass#

Re-exported from ocx_sdk._distView source

urlmethodclassmethod#

def url(url: str | None = None, sha256: str | None = None, auth: Auth | None = None, headers: Mapping[str, str] | None = None) -> DistSource

Fetch the manifest over https.

Parameters

NameTypeDefaultDescription
urlstr | NoneNoneManifest URL. None keeps the default source, which honors OCX_INSTALL_DIST_URL from the environment.
sha256str | NoneNoneExpected digest of the manifest body. Required whenever the host is not setup.ocx.sh or a mirror is in play; derived automatically from a dist/<sha256>.json URL.
authAuth | NoneNoneCredentials for this origin, and this origin only.
headersMapping[str, str] | NoneNoneExtra request headers, bound to the same origin.

Returns

DistSource
The source.

Raises

DistManifestError
sha256 is not 64 lowercase hex digits.