--- id: py-cid version: "0.5.0" license: MIT license_treatment: permissive maintenance: active --- # py-cid — Self-describing content-addressed identifiers for distributed systems License: permissive · Maintenance: active · Downloads: 164.5K/mo ## What it is and what it does py-cid is a Python implementation of the CID specification, a format for self-describing, content-addressed identifiers used in distributed systems like IPFS and IPLD. It wraps cryptographic hashing (via multihash), codec selection (via multicodec), and string encoding (via multibase) into a single identifier that can be created from a hash string, inspected for its version, codec, and multihash components, and re-encoded back to string form. The package is primarily useful for applications that interact with IPFS or IPLD networks, or that need to work with content-addressed storage systems. It handles both CIDv0 (legacy) and newer CID formats, and provides a straightforward API to parse existing CIDs and generate new ones from hash data. Use it for: - Parse and validate IPFS content hashes (CIDv0 strings) in Python applications. - Generate CIDs from raw multihash data for storing or referencing content in IPFS. - Inspect CID metadata (version, codec, hash algorithm) for routing or validation logic. - Convert between CID string representations and their structured components. - Build IPLD-compatible applications that need to work with content-addressed identifiers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. py-cid encodes and decodes CIDs (Content IDentifiers), the self-describing content-addressed identifiers used by IPFS and IPLD to reference distributed content via cryptographic hashing. Yes, if you are building on IPFS or IPLD. The package is actively maintained, has low install friction, carries a permissive MIT license, and has no known vulnerabilities. The Pre-Alpha classifier is a minor signal to check the project's stability guarantees, but the active maintenance and long release history since first release in 2017 suggest it is production-ready for its intended use. Install it if you need to work with CIDs; skip it if you have no IPFS/IPLD integration. ## Install pip install py-cid uv add py-cid poetry add py-cid ## Installing py-cid Before you install: Low install friction: pure Python wheel with four runtime dependencies (py-multibase, py-multicodec, morphys, py-multihash). Actively maintained with a recent commit on 2026-07-13 and regular release cadence since first release in 2017. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: from cid import make_cid cid = make_cid('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4') print(cid.version, cid.codec, cid.multihash) print(cid.encode()) Requires Python 3.10 or later (supports 3.10–3.14). Verify before relying: - Whether py-multihash, py-multicodec, py-multibase, and morphys are actively maintained and have no known vulnerabilities. - Performance characteristics when encoding/decoding large batches of CIDs. - Whether the Pre-Alpha status (Development Status :: 2) indicates API stability concerns or ongoing breaking changes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 164.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags IPFS content identifier, CID encoding decoding, content addressing, distributed system identifiers, multihash multicodec multibase, IPLD content reference, cryptographic content hash, ipfs, content-addressing, distributed-systems [View on SkillFed](https://skillfed.io/packages/py-cid) · [View on PyPI](https://pypi.org/project/py-cid/)