Add comprehensive feature parity with go-cid implementation.
This includes 13 major features organized by priority:
Critical Features (P0): - JSON Marshaling (IPLD Format):
BaseCID.to_json_dict(),BaseCID.from_json_dict(), andCIDJSONEncoderfor full JSON integration - Prefix Operations:Prefixclass for CID metadata management,Prefix.sum()for creating CIDs from data, andBaseCID.prefix()for extracting prefixHigh Priority Features (P1): - /ipfs/ Path Parsing:
parse_ipfs_path()and automatic extraction infrom_string()- Extract Encoding:extract_encoding()to get multibase encoding without full parsing - Trailing Bytes Validation:from_bytes_strict()for strict CID parsingMedium Priority Features (P2): - Builder Pattern:
V0BuilderandV1Builderfor fluent CID construction - Set Operations:CIDSetclass for managing collections of unique CIDs with full Python set interface - Defined Check:BaseCID.defined()to check if CID is valid - Stream Parsing:from_reader()for parsing CIDs from streamsLow Priority Features (P3): - MustParse:
must_parse()convenience function for strict parsing - Binary/Text Marshaling:BaseCID.to_bytes(),BaseCID.to_text(), andBaseCID.from_text()- KeyString:BaseCID.key_string()for binary representation as string - Loggable:BaseCID.loggable()for logging purposesAll features include comprehensive tests (168 total, 81% coverage) and complete documentation with working code examples. (#60)
- Add Python 3.14 to the supported and tested interpreter list across tox and CI. (#45)
- Migrate from pymultihash to py-multihash >= 2.0.0 for better maintenance and modern API support. (#47)
- Update license format in pyproject.toml from deprecated TOML table to SPDX string format to comply with setuptools>=77.0.0 requirements. (#46)
- Copied
base58code directly intopy-cidto avoid future dependency issues. (#52)
- Complete build system modernization with pyproject.toml Added comprehensive development tooling (ruff, mypy, pre-commit, tox) Updated dependencies to use pymultihash instead of py-multihash Added GitHub Actions CI/CD pipeline Added type stubs for mypy support Updated Python version support to 3.10+ Enhanced testing with pytest, hypothesis, and coverage Added towncrier for changelog management Improved documentation and contributing guidelines (#40)
- Fix edge cases with multibase and multihash decoding
- Added hypothesis tests while verifying CIDs
- Handle the case where an incorrect base58 encoded value is provided to make_cid
- First release on PyPI.