ResourceDefinition#
- class pymovements.ResourceDefinition(content: str, *, source: WebSource | None = None, url: str | None = None, filename: 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_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.
- url#
The URL to the downloadable resource. (default: None)
Deprecated since version v0.26.2: Please use
sourceinstead. This property will be removed in v0.31.0.- Type:
str | None
- filename#
The target filename of the downloadable resource. (default: None)
Deprecated since version v0.26.2: Please use
sourceinstead. This property will be removed in v0.31.0.- Type:
str | None
- md5#
The MD5 checksum of the downloadable resource. (default: None)
Deprecated since version v0.26.2: Please use
sourceinstead. This property will be removed in v0.31.0.- Type:
str | None
- mirrors#
A list of additional mirror URLs to download the resource. (default: None)
Deprecated since version v0.26.2: Please use
sourceinstead. This property will be removed in v0.31.0.
- Parameters:
content (str) – The content type of the resource.
source (WebSource | None) – The source of the downloadable resource. (default: None)
url (str | None) – The URL to the downloadable resource. (default: None)
filename (str | None) – The target filename of the downloadable resource. This may be an archive. (default: None)
mirrors (list[str] | None) – 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)md5 (str | None) – The MD5 checksum of the downloadable resource. (default: None)
filename_pattern (str | None) – The filename pattern of the resource files. Named groups will be parsed as metadata will appear in the fileinfo dataframe. (default: None)
filename_pattern_schema_overrides (dict[str, type] | None) – If named groups are present in the filename_pattern, this specifies their particular datatypes. (default: None)
load_function (str | None) – 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)
load_kwargs (dict[str, Any] | None) – A dictionary of additional keyword arguments that are passed to the
load_function. (default: None)
Methods