py-multibase
Multibase implementation for Python
What it is and what it does
py-multibase is a Python implementation of the Multibase protocol, a standard for encoding data into strings while embedding metadata about which base encoding was used. Instead of requiring the decoder to guess or be told separately what encoding was applied, Multibase prepends a single-character code that identifies the base (e.g., 'z' for base58btc, 'm' for base64), making the encoded value self-describing. This solves the problem of coordinating base-encoding choices across systems and transports that have different restrictions or requirements.
The package provides both simple functional APIs (encode/decode) and reusable Encoder/Decoder classes, plus utilities to query supported encodings and retrieve encoding metadata. It supports a wide range of bases from binary (base2) through base256emoji, making it useful for applications that need to interchange data across systems with varying transport constraints or human-readability requirements.
Use it for:
- Encode data for transmission over systems with restricted character sets, letting the receiver auto-detect which base was used.
- Build APIs or protocols where the encoding scheme must be self-evident in the output without separate metadata.
- Convert between multiple base encodings (base58, base64, base32, etc.) while preserving encoding information.
- Store or log encoded data in a format that remains unambiguous when decoded by other tools or languages.
- Implement content-addressable systems (like IPFS) that rely on multibase for consistent encoding across nodes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Encodes and decodes data using the Multibase protocol, which adds a self-describing prefix to indicate which base encoding (base2, base16, base58, base64, etc.) was used.
Yes, if you need to work with the Multibase protocol or interchange data across systems with different base-encoding requirements. The package is actively maintained, has low install friction, and carries a permissive MIT license. The Pre-Alpha status and modest popularity suggest it is stable enough for production use in its domain but may not be widely battle-tested; verify that the three runtime dependencies suit your environment.
Install
py-multibase on PyPI
pip
pip install py-multibaseuv
uv add py-multibasepoetry
poetry add py-multibaseInstalling py-multibase
Before you install
Low install friction with three lightweight runtime dependencies. Actively maintained as of July 2026, though marked Pre-Alpha in development status.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install py-multibase
from multibase import encode, decode
encoded = encode('base58btc', 'hello world')
decoded = decode(encoded)
print(decoded) # b'hello world'
Requires Python 3.10 or later.
Verify before relying
- Performance characteristics when encoding/decoding large datasets or many small values.
- Whether the three runtime dependencies (python-baseconv, six, morphys) are actively maintained.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — python-baseconv, six, morphys |
| Maintenance | actively maintained — 239 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 180,845/month — #10,138 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_multibase-2.0.0-py3-none-any.whl
Keywords: multibase
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
basesProvides customizable Base-N encoding and…
unclear · top 15,000 on PyPI
py-multicodecWraps data with self-describing multicodec…
permissive · top 15,000 on PyPI
python-baseconvConverts integers to and from strings in…
permissive · top 15,000 on PyPI
unpaddedbase64Encodes and decodes Base64 data without RFC…
permissive · top 5,000 on PyPI
bencode.pyEncodes and decodes bencode format, the binary…
unclear · top 15,000 on PyPI
mbstrdecoderDecodes multi-byte character strings by…
permissive · top 5,000 on PyPI
java-manifestEncode and decode Java's META-INF/MANIFEST.MF…
unclear · top 15,000 on PyPI
base64ioProvides a streaming interface for Base64…
permissive · top 15,000 on PyPI
py-cidpy-cid encodes and decodes CIDs (Content…
permissive · top 15,000 on PyPI
pybase64Fast base64 encoding and decoding via a C…
permissive · top 1,000 on PyPI