Skip to main content

High-performance Python bindings for ISO 24138:2024 (ISCC)

Project description

iscc-lib

CI PyPI License

High-performance Python bindings for ISO 24138:2024 -- International Standard Content Code (ISCC). Built on a Rust core for speed, with a Pythonic API that is a drop-in replacement for iscc-core.

What is ISCC

The ISCC is a similarity-preserving fingerprint and identifier for digital media assets. ISCCs are generated algorithmically from digital content, just like cryptographic hashes. However, instead of using a single cryptographic hash function to identify data only, the ISCC uses various algorithms to create a composite identifier that exhibits similarity-preserving properties (soft hash).

Installation

pip install iscc-lib

Quick Start

import iscc_lib as ic

result = ic.gen_meta_code_v0("ISCC Test Document!")
print(f"Meta-Code: {result['iscc']}")

API Overview

Code Generators

Function Description
gen_meta_code_v0 Generate a Meta-Code from metadata fields
gen_text_code_v0 Generate a Text-Code from plain text
gen_image_code_v0 Generate an Image-Code from pixel data
gen_audio_code_v0 Generate an Audio-Code from Chromaprint data
gen_video_code_v0 Generate a Video-Code from frame signatures
gen_mixed_code_v0 Generate a Mixed-Code from Content-Codes
gen_data_code_v0 Generate a Data-Code from bytes or stream
gen_instance_code_v0 Generate an Instance-Code from bytes or stream
gen_iscc_code_v0 Generate a composite ISCC-CODE
gen_sum_code_v0 Generate an ISCC-SUM from a file path

Utilities

  • Text processing: text_clean, text_remove_newlines, text_trim, text_collapse
  • Algorithm primitives: alg_simhash, alg_minhash_256, alg_cdc_chunks, sliding_window
  • Soft hashing: soft_hash_video_v0
  • Encoding: encode_base64
  • Codec: iscc_decompose
  • Streaming: DataHasher, InstanceHasher for incremental processing
  • Diagnostics: conformance_selftest

Streaming functions (gen_data_code_v0, gen_instance_code_v0) accept both bytes and file-like objects (BinaryIO).

Links

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iscc_lib-0.3.0.tar.gz (102.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

iscc_lib-0.3.0-cp310-abi3-win_amd64.whl (439.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

iscc_lib-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (539.9 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

iscc_lib-0.3.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (988.2 kB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file iscc_lib-0.3.0.tar.gz.

File metadata

  • Download URL: iscc_lib-0.3.0.tar.gz
  • Upload date:
  • Size: 102.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iscc_lib-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ccfc107903b75c5b00e46bbcb0066531f0b362bf914d116fab17783f4a861050
MD5 2bbfc68ad89bde7eccf9de62a8ff2a29
BLAKE2b-256 ec4ff7080f795ef04fc147797eefb698b7e465b56982bee09ebd649027d7d655

See more details on using hashes here.

Provenance

The following attestation bundles were made for iscc_lib-0.3.0.tar.gz:

Publisher: release.yml on iscc/iscc-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iscc_lib-0.3.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: iscc_lib-0.3.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 439.3 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iscc_lib-0.3.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 54adcad72cc5e511fdc91856239c51d70a248a3ab7f8bef3da20ea65966e4fbd
MD5 23968439d9e9d23980106483cf53d55a
BLAKE2b-256 456a1a6f17d6ac318daba17cc454ff32ec78c0c3bfb9d4ee42770dc3a01adbb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for iscc_lib-0.3.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on iscc/iscc-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iscc_lib-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for iscc_lib-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8708546f7cd2a8326b510a14a64a9e672e9abda31b07466ba0ab657e96068225
MD5 864019b798dd5f2f78a731940f9954bd
BLAKE2b-256 7a01e059e03ab2bebac2047ed5fb4d838851da11657a0a623998591ab97f44f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for iscc_lib-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on iscc/iscc-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iscc_lib-0.3.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for iscc_lib-0.3.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 5612e5fb62b90b843ea5587b145a5e07c9ccbd94deead870c4ebe0443c1a7384
MD5 2111011fc1383b82739de9ef2efc0bc6
BLAKE2b-256 2dd3a1a679256737eb3ff1e3db316b3083ab20dc366646119c79cba9f6e7539e

See more details on using hashes here.

Provenance

The following attestation bundles were made for iscc_lib-0.3.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on iscc/iscc-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page