CID Module
Content Identifier (CID) representation for IPFS.
- class ipfs_dict_chain.CID.CID(value: str)[source]
Bases:
objectA class representing a Content Identifier (CID) in the IPFS network.
- Parameters:
value – The CID value as a string.
- CID_REGEX = re.compile('^(/ipfs/)?([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{46}|[bBzZ9FfUV][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+)$')
- __eq__(other: Any) bool[source]
Return True if the other object is a CID with the same value, False otherwise.
- __init__(value: str) None[source]
Initialize the CID object.
- Parameters:
value (str) – The CID value as a string.
- Raises:
ValueError – If the provided value is not a valid CID string.
- __ne__(other: Any) bool[source]
Return True if the other object is not a CID or has a different value, False otherwise.