WebSource#

class pymovements.WebSource(url: str, *, filename: str | None = None, md5: str | None = None, mirrors: list[str] | None = None)[source]#

Web-based source of a dataset resource.

url#

Primary URL of the resource to be downloaded.

Type:

str

filename#

Optional target filename. If not provided, the basename of the URL path is used.

Type:

str | None

md5#

Optional MD5 checksum for integrity verification.

Type:

str | None

mirrors#

Optional list of full mirror URLs. Tried in order if primary URL fails.

Type:

list[str] | None

Methods

__init__(url, *[, filename, md5, mirrors])

download(target_dirpath, *[, verbose])

Download this resource into target_dirpath.

from_dict(data)

Create a WebSource from a dictionary.

to_dict(*[, exclude_none])

Serialize this WebSource to a dictionary.

Attributes