skillfed

py-multibase

Multibase implementation for Python

py-multibase v2.0.0 180.8K downloads/30d#10,138 on PyPI25
Permissive license MIT Active released

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-multibase

uv

uv add py-multibase

poetry

poetry add py-multibase

Installing 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

Development Status :: 2 - Pre-AlphaIntended 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

Tags

multibase encoding decodingbase encoding protocolself-describing base codecbase58 base64 conversiondata encoding with prefixmultiformat base encodingportable base encoding
encodingmultiformatprotocol

More Software Development packages