Install & Compatibility
Where this runs
tested against v1.0.2 · 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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
b58encode
✓ import base58check
encoded_data = base58check.b58encode(b'my_data')
✗ from base58check import encode
The functions are named `b58encode` and `b58decode` within the module.
b58decode
✓ import base58check
decoded_data = base58check.b58decode('encodedstring')
✗ from base58check import decode
The functions are named `b58encode` and `b58decode` within the module.
Demonstrates encoding a byte string and decoding it back, along with a simple example of a Bitcoin-like address encoding pattern.
import base58check
# Encode binary data
original_data = b"Hello, Base58Check!"
encoded_string = base58check.b58encode(original_data)
print(f"Encoded: {encoded_string}")
# Decode a Base58Check string
decoded_data = base58check.b58decode(encoded_string)
print(f"Decoded: {decoded_data}")
# Example with a Bitcoin-like address (simulated for demonstration)
simulated_address_bytes = b'\x00' + b'\x01\x09\x66\x77\x60\x06\x95\x3D\x55\x67\x43\x9E\x5E\x39\x8E\x8B\x0D\x9C\x1C\x00\x10' # Example payload
simulated_address_encoded = base58check.b58encode(simulated_address_bytes)
print(f"Simulated Address: {simulated_address_encoded}")
Errors
Common errors & fixes
ValueError: Invalid base58check string
Attempting to decode a string that is not a valid Base58Check format (e.g., incorrect characters, wrong length, or a failed checksum verification).
fixEnsure the input string was originally encoded using Base58Check and is not corrupted. Implement `try...except ValueError` for robust error handling.
AttributeError: module 'base58check' has no attribute 'encode'
Trying to use `base58check.encode()` or `base58check.decode()` directly instead of the library's specific function names `base58check.b58encode()` and `base58check.b58decode()`.
fixCorrect the function call to `base58check.b58encode()` for encoding and `base58check.b58decode()` for decoding.
Upgrade
Version history
1.0.2latest on PyPI · released Apr 7, 2018
Audit
Dependencies
No dependency data recorded yet.