Skip to main content
https://img.shields.io/pypi/v/py-cid.svg https://codecov.io/gh/ipld/py-cid/branch/master/graph/badge.svg Documentation Status

What is CID ?

CID is a format for referencing content in distributed information systems, like IPFS. It leverages content addressing, cryptographic hashing, and self-describing formats.

It is the core identifier used by IPFS and IPLD.

CID is a self-describing content-addressed identifier.

It uses cryptographic hashes to achieve content addressing.

It uses several multiformats to achieve flexible self-description, namely multihash for hashes, multicodec for data content types, and multibase to encode the CID itself into strings.

Sample Usage

>>> from cid import make_cid
>>> make_cid('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4')
CIDv0(version=0, codec=dag-pb, multihash=b"\x12 \xb9M'\xb9\x93M>\x08\xa5.R\xd7\xda}\xab\xfa\xc4\x84..")

>>> cid = make_cid('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4')
>>> print(cid.version, cid.codec, cid.multihash)

>>> print(cid.encode())
QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4

>>> str(cid)
'QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4'

Other info

Release files for py-cid 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-cid 0.5.0
File Size Uploaded
py_cid-0.5.0.tar.gz 38.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-cid 0.5.0
File Interpreter ABI Platform
py_cid-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.1 kB

Release files / py_cid-0.5.0.tar.gz

Download URL py_cid-0.5.0.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
93c62586c672353a9862f3fce13c9848ea39a00378e0980e2f0eed91631f3d28
BLAKE2b-256 checksum
How to use checksums
968e68c2bd0346247570e8e01e8c170a0237884e95cdfa43989527b71adaa978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / py_cid-0.5.0-py3-none-any.whl

Download URL py_cid-0.5.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fbad437384534e2a0ab0c4068aac3e510c4cb710c89c8f6bf98f4b07ed54e3e
BLAKE2b-256 checksum
How to use checksums
2b18eaea1571ae8b4fa490793a4b78a9641c4579a884f7a26f3d1b019d7e91c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page