Skip to content

ISCC - Main High-Level Functions#

SDK main top-level functions.

code_iscc(fp) #

Generate ISCC-CODE.

The ISCC-CODE is a composite of Meta, Content, Data and Instance Codes.

Parameters:

Name Type Description Default
fp str

Filepath used for ISCC-CODE creation.

required

Returns:

Type Description
IsccMeta

ISCC metadata including ISCC-CODE and merged metadata from ISCC-UNITs.

code_meta(fp) #

Generate Meta-Code from digital asset.

Parameters:

Name Type Description Default
fp str

Filepath used for Meta-Code creation.

required

Returns:

Type Description
IsccMeta

ISCC metadata including Meta-Code and extracted metadata fields.

code_content(fp, extract_meta = None, create_thumb = None) #

Detect mediatype and create corresponding Content-Code.

Parameters:

Name Type Description Default
fp str

Filepath

required
extract_meta bool|None

Whether to extract metadata.

None
create_thumb bool|None

Whether to create a thumbnail.

None

Returns:

Type Description
IsccMeta

Content-Code wrapped in ISCC metadata.

code_text(fp, extract_meta = None, create_thumb = None) #

Generate Content-Code Text.

Parameters:

Name Type Description Default
fp str

Filepath used for Text-Code creation.

required
extract_meta bool|None

Whether to extract metadata.

None
create_thumb bool|None

Whether to create a thumbnail.

None

Returns:

Type Description
IsccMeta

ISCC metadata including Text-Code.

code_image(fp, extract_meta = None, create_thumb = None) #

Generate Content-Code Image.

Parameters:

Name Type Description Default
fp str

Filepath used for Image-Code creation.

required
extract_meta bool|None

Whether to extract metadata.

None
create_thumb bool|None

Whether to create a thumbnail.

None

Returns:

Type Description
IsccMeta

ISCC metadata including Image-Code.

code_audio(fp, extract_meta = None, create_thumb = None) #

Generate Content-Code Audio.

Parameters:

Name Type Description Default
fp str

Filepath used for Audio-Code creation.

required
extract_meta bool|None

Whether to extract metadata.

None
create_thumb bool|None

Whether to create a thumbnail.

None

Returns:

Type Description
IsccMeta

ISCC metadata including Audio-Code.

code_video(fp, extract_meta = None, create_thumb = None) #

Generate Content-Code Video.

Parameters:

Name Type Description Default
fp str

Filepath used for Video-Code creation.

required
extract_meta bool|None

Whether to extract metadata.

None
create_thumb bool|None

Whether to create a thumbnail.

None

Returns:

Type Description
IsccMeta

ISCC metadata including Image-Code.

code_data(fp) #

Create ISCC Data-Code.

The Data-Code is a similarity preserving hash of the input data.

Parameters:

Name Type Description Default
fp str

Filepath used for Data-Code creation.

required

Returns:

Type Description
IsccMeta

ISCC metadata including Data-Code.

code_instance(fp) #

Create ISCC Instance-Code.

The Instance-Code is prefix of a cryptographic hash (blake3) of the input data. It´s purpose is to serve as a checksum that detects even minimal changes to the data of the referenced media asset. For cryptographicaly secure integrity checking a full 256-bit multihash is provided with the datahash field.

Parameters:

Name Type Description Default
fp str

Filepath used for Instance-Code creation.

required

Returns:

Type Description
IsccMeta

ISCC metadata including Instance-Code, datahash and filesize.