ResourceDefinition#
- class pymovements.ResourceDefinition(content: str, filename: str | None = None, url: str | None = None, mirrors: list[str] | None = None, md5: str | None = None, filename_pattern: str | None = None, filename_pattern_schema_overrides: dict[str, type] | None = None, load_function: str | None = None, load_kwargs: dict[str, Any] | None = None)[source]#
ResourceDefinition definition.
- filename#
The target filename of the downloadable resource. This may be an archive. (default: None)
- Type:
str | None
- mirrors#
An optional list of additional mirror URLs to download the resource. If downloading the resource from
urlfails, these mirror URLs are used in order of appearance. (default: None)
- filename_pattern#
The filename pattern of the resource files. Named groups will be parsed as metadata will appear in the fileinfo dataframe. (default: None)
- Type:
str | None
- filename_pattern_schema_overrides#
If named groups are present in the filename_pattern, this specifies their particular datatypes. (default: None)
- load_function#
The name of the function used to load the data files. If None, the function is determined by the file extension. Refer to Input / Output for available function names. (default: None)
- Type:
str | None
- load_kwargs#
A dictionary of additional keyword arguments that are passed to the
load_function. (default: None)
Methods
__init__(content[, filename, url, mirrors, ...])from_dict(dictionary)Create a
Resourceinstance from a dictionary.to_dict(*[, exclude_none])Convert the
ResourceDefinitioninstance into a dictionary.Attributes