owmeta_core.data_trans.file_ds module¶
- class owmeta_core.data_trans.file_ds.FileDataSource(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
DataSource
This DataSource represents a “file”, essentially a sequence of bytes with a name
- Attributes
- source_file_pathpath-like object
The file to commit for this datasource
- file_contents()[source]¶
Returns a file object for reading data from the file
- update_hash(algorithm)[source]¶
Set a message digest property for the file
- Parameters
- algorithm
str
The name of the property and algorithm to update
- algorithm
- md5¶
“MD5 hash”, a
DatatypeProperty
- sha256¶
“SHA-256 hash”, a
DatatypeProperty
- sha512¶
“SHA-512 hash”, a
DatatypeProperty