ResourceDefinition#
- class pymovements.ResourceDefinition(content: str, filename: str | None = None, url: str | None = None, md5: str | None = None, filename_pattern: str | None = None, filename_pattern_schema_overrides: dict[str, type] | None = None)[source]#
ResourceDefinition definition.
- content#
The content type of the resource.
- Type:
str
- filename#
The target filename of the downloadable resource. This may be an archive. (default: None)
- Type:
str | None
- url#
The URL to the downloadable resource. (default: None)
- Type:
str | None
- md5#
The MD5 checksum of the downloadable resource. (default: None)
- Type:
str | 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)
- Type:
dict[str, type] | None
Methods
__init__
(content[, filename, url, md5, ...])from_dict
(dictionary)Create a
Resource
instance from a dictionary.to_dict
(*[, exclude_none])Convert the
ResourceDefinition
instance into a dictionary.Attributes