Registry / serialization / bases
library0.3.0pypypi✓ verified 81d ago

Python library for general Base-N encodings (e.g., base64, base32, base16, hex, binary, and custom alphabets). Version 0.3.0 supports Python 3.7+ and uses runtime type validation. Release cadence is low; no releases since 2022.

pip install bases
INSTALL
IMPORT
SIG · BASES
B
bases
serializationpythonv0.3.0
Install
1.7s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

alphabet
from bases import alphabet
from bases import Alphabet
base64
from bases import base64
base32
from bases import base32

Import Base64Encoding, encode bytes, and decode back.

from bases import Base64Encoding encoding = Base64Encoding() data = b'hello world' encoded = encoding.export(data) print(encoded) # Output: aGVsbG8gd29ybGQ= decoded = encoding.import_bytes(encoded) print(decoded) # Output: b'hello world'
Debug
Known issues
gotchaThe `import_bytes` method returns bytes, not string. Do not assume it returns a string.
fix
Use `encoding.import_bytes(encoded)` and handle bytes output.
affects: >=0.1.0
deprecatedPython 3.6 support was removed in v0.2.0. If your project requires Python 3.6, pin to v0.1.1.
fix
Upgrade to Python 3.7+ or use `bases==0.1.1`.
affects: >=0.2.0
gotchaCustom alphabets must be strings of unique characters without duplicates. Violation raises ValueError.
fix
Ensure alphabet has no duplicate characters.
affects: >=0.1.0
Upgrade
Version history
0.3.0latest on PyPI · released Dec 18, 2023
Audit
Dependencies
typing-validationrequiredRuntime type validation
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
bases — pip install bases · libregistry