py-multicodec
Multicodec implementation in Python
Decision gist · record as of 2026-08-14
Yes, if you work with IPFS, IPLD, or other multiformats ecosystems. The package is stable (Production/Stable classifier), has no known vulnerabilities, and installs with minimal friction. Maintenance is aging (239 days since last release), but the repository is active and the API is mature. Install it for multicodec prefix operations; avoid it if you have no need for format-agnostic codec tagging.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction install with a single runtime dependency (varint).
- Last release was recent; repository is active and not archived, though maintenance status is aging with 239 days since last release.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
last release 2025-12-18 (239 days) · last repo commit 2025-12-18 · 19 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 174,588 downloads/mo, #10,279 on PyPI
Alternatives
Verify before relying
pip install py-multicodec
from multicodec import add_prefix, remove_prefix, get_codec
# Add codec prefix to data
prefixed = add_prefix('sha2-256', b'EiC5TSe5k00')
# Retrieve codec name from prefixed data
codec_name = get_codec(prefixed)- Whether the 460 known codecs listed in the description are current as of the latest release.
- Performance characteristics when handling large batches of codec operations.
- Stability guarantees for the multicodec table updates and backward compatibility across versions.
What it is and what it does
py-multicodec is a Python implementation of the Multicodec specification, a self-describing multiformat standard that wraps data with a tiny varint-encoded header identifying the codec used. The library lets you add codec prefixes to binary data, extract those prefixes, and look up which codec was used—all grounded in a table of supported codecs maintained from the upstream multiformats specification.
The package provides both simple prefix operations (add_prefix, remove_prefix, get_codec) and type-safe codec management through named Code constants and a known_codes registry. It supports modern Python versions (3.10 through 3.14) and depends only on varint for encoding/decoding the multicodec identifiers. The library is commonly used in IPFS and IPLD ecosystems where content addressing and format identification are critical.
Use it for
- Tag binary data with codec identifiers in IPFS/IPLD applications to enable format-agnostic content addressing.
- Decode multicodec-prefixed data to identify the underlying format before processing.
- Build type-safe codec handling in systems that work with multiple serialization formats (CBOR, JSON, Protocol Buffers).
- Maintain a canonical reference of supported multicodec codes in a Python application.
- Wrap custom or domain-specific data formats with standard multicodec headers for interoperability.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with IPFS, IPLD, or other multiformats ecosystems.
The package is stable (Production/Stable classifier), has no known vulnerabilities, and installs with minimal friction. Maintenance is aging (239 days since last release), but the repository is active and the API is mature. Install it for multicodec prefix operations; avoid it if you have no need for format-agnostic codec tagging.
Install
py-multicodec on PyPI
Before you install
Low friction install with a single runtime dependency (varint). Last release was recent; repository is active and not archived, though maintenance status is aging with 239 days since last release.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install py-multicodec
from multicodec import add_prefix, remove_prefix, get_codec
# Add codec prefix to data
prefixed = add_prefix('sha2-256', b'EiC5TSe5k00')
# Retrieve codec name from prefixed data
codec_name = get_codec(prefixed)
Verify before relying
- Whether the 460 known codecs listed in the description are current as of the latest release.
- Performance characteristics when handling large batches of codec operations.
- Stability guarantees for the multicodec table updates and backward compatibility across versions.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagevarint |
| Maintenance | Aging 239 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 174,588 / month, #10,279 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: py_multicodec-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “multicodec prefix encoding”
- py-multicodecWraps data with self-describing multicodec prefixes, enabling format…
- py-cidpy-cid encodes and decodes CIDs (Content IDentifiers), the…
- eth-rlpProvides RLP (Recursive Length Prefix) encoding and decoding…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also py-cid · py-multibase · multiaddr · rlp · eth-rlp · prefixed · scalecodec · mbstrdecoder · numcodecs