simvx.core.assets.sources.http

HTTP/HTTPS source: fetches bytes over the network.

Uses :mod:urllib.request from the standard library so the engine has no required network dependency. The web backend overrides this with a pyodide.http.pyfetch shim (see simvx.web.assets).

Listing is not supported: HTTP has no portable directory protocol. To load a group of remote URIs, ship a manifest JSON listing the URIs and call AssetServer.load_manifest(...).

Module Contents

Classes

HttpSource

Reads bytes via :func:urllib.request.urlopen.

API

class simvx.core.assets.sources.http.HttpSource(*, timeout: float = 10.0)[source]

Reads bytes via :func:urllib.request.urlopen.

Captures the ETag response header (when present) and exposes it through :meth:version so the cache can revalidate without a full refetch on subsequent loads.

Initialization

scheme

‘https’

read_bytes(uri: str) bytes[source]
version(uri: str) str | None[source]
abstractmethod list(uri: str) collections.abc.Iterable[str][source]