Skip to content

ISCC - IPFS Tools#

Pure Python IPFS CIDv1 computation (Kubo-compatible).

ipfs_cidv1(fp, wrap=False) #

Compute IPFS CIDv1 for file (Kubo-compatible, pure Python).

Parameters:

Name Type Description Default
fp

Filepath to hash.

required
wrap

Wrap file in a directory and append filename to CID path.

False

Returns:

Type Description

IPFS CIDv1 base32lower string.

ipfs_cidv1_base16(fp) #

Compute IPFS CIDv1 with base16 encoding (Kubo-compatible, pure Python).

Parameters:

Name Type Description Default
fp

Filepath to hash.

required

Returns:

Type Description

IPFS CIDv1 base16 (hex) string.