bases
Python library for general Base-N encodings.
What it is and what it does
Bases is a Python library that implements parametric Base-N encoding and decoding for multiple common formats, including those defined in the multibase specification (except proquints). It provides pre-built encoders like base32 and allows you to construct custom base encodings by specifying an alphabet and encoding style.
The library handles practical variations like case sensitivity, padding inclusion/exclusion, and block-based zero-padding. It depends on typing-extensions and typing-validation for type hints and validation. The package is typed and supports Python 3.7 through 3.12, though maintenance is dormant—the last release was 970 days ago.
Use it for:
- Encode binary data to base32 strings for safe transmission or storage in text-based systems
- Decode multibase-formatted strings back to their original binary form in interoperable applications
- Create custom Base-N encodings with specific alphabets and padding rules for domain-specific protocols
- Convert between case-sensitive and case-insensitive variants of the same base encoding
- Implement binary-to-text encoding in cryptographic or data serialization workflows
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides customizable Base-N encoding and decoding for common styles including those in the multibase specification, with support for case and padding variations.
Yes, if you need a straightforward Base-N encoding library with multibase compatibility and low install friction. The dormant maintenance status (970 days since last release) is a minor concern for a stable, narrow-scope library with no known vulnerabilities, but verify the license claim before use. Not recommended if you need active development or frequent updates.
Install
bases on PyPI
pip
pip install basesuv
uv add basespoetry
poetry add basesInstalling bases
Before you install
Low install friction with only two runtime dependencies (typing-extensions, typing-validation). Maintenance is dormant—last release was 970 days ago with no recent commits, though the repository remains active and the package supports current Python versions.
License in practice
License treatment is unclear; the description mentions MIT but the fact sheet does not confirm this formally. Verify the actual license before relying on it for compliance purposes.
Quickstart
pip install bases
import bases
from bases import base32
b = bytes([70, 98, 190, 187, 66, 224, 178])
encoded = base32.encode(b)
print(encoded) # 'IZRL5O2C4CZA===='
decoded = base32.decode(encoded)
print(decoded) # b'Fb\xbe\xbbB\xe0\xb2'
Verify before relying
- Whether the MIT license claim in the description is formally declared in package metadata
- Performance characteristics when encoding/decoding large binary payloads
- Whether all multibase specification styles are fully implemented (proquints are explicitly excluded)
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — typing-extensions, typing-validation |
| Maintenance | dormant — 970 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 109,554/month — #12,511 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bases-0.3.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
py-multibaseEncodes and decodes data using the Multibase…
permissive · top 15,000 on PyPI
base32-crockfordEncodes and decodes data using Douglas…
permissive · top 15,000 on PyPI
mikeshardmind-base2048Encodes binary data into text using base2048, a…
copyleft · top 15,000 on PyPI
bech32mEncodes and decodes Bech32 and Bech32m strings,…
permissive · top 15,000 on PyPI
bech32Encodes and decodes bech32-formatted strings, a…
permissive · top 15,000 on PyPI
python-baseconvConverts integers to and from strings in…
permissive · top 15,000 on PyPI
x690Encodes and decodes data using the X.690 BER…
permissive · top 15,000 on PyPI
sed4onnxEncodes and decodes Base64-formatted constant…
permissive · top 15,000 on PyPI
binapyBinaPy wraps Python's binary-handling libraries…
permissive · top 5,000 on PyPI
based58Encodes and decodes data using Base58 and…
unclear · top 15,000 on PyPI