Self-describing content-addressed identifiers for distributed systems
Project description
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
Free software: MIT license
Documentation: https://py-cid.readthedocs.io.
Python versions: 3.10-3.14
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_cid-0.4.0.tar.gz.
File metadata
- Download URL: py_cid-0.4.0.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c15d6a83f59c3a4c7fbff793f1d4cbfc831e90355fd0e2c5cfe927c21733cc3
|
|
| MD5 |
db97b39dfb93a1329b7dd364d75fc074
|
|
| BLAKE2b-256 |
e709c0ca25eac91c62f6f22f5ac6accd0bfa957e77adfdffd0eccc0700f2ea07
|
File details
Details for the file py_cid-0.4.0-py3-none-any.whl.
File metadata
- Download URL: py_cid-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3183a3088b219dbf3cb37eec7d47a644be3f3ebabdf38347c2e9312621d6cc
|
|
| MD5 |
234ef1f7d43ba02ef211a9cf63645ba6
|
|
| BLAKE2b-256 |
8039d5c1828e79526002f1bf87b9daba01c7db445960daf341e1dd84a5ff0469
|