{"id":23341,"library":"based58","title":"Base58","description":"A fast Python library for Base58 and Base58Check encoding/decoding. Version 0.1.1 supports Python >=3.7. Development is active with releases on a monthly cadence.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/keis/base58","tags":["base58","encoding","cryptocurrency","bitcoin"],"install":[{"cmd":"pip install based58","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"A commonly confused library with similar name and API. based58 is not a dependency of base58 or vice versa.","package":"base58","optional":true}],"imports":[{"note":"'base58' is a different library; using it will import the wrong module.","wrong":"from base58 import Base58","symbol":"Base58","correct":"from based58 import Base58"},{"note":"API naming differs; based58 uses snake_case, base58 uses b58 prefix.","wrong":"from base58 import b58decode","symbol":"base58_decode","correct":"from based58 import base58_decode"},{"note":"Direct import; no common mistake beyond library confusion.","symbol":"base58_encode","correct":"from based58 import base58_encode"},{"note":"Also available: base58_check_encode for Base58Check operations.","symbol":"base58_check_decode","correct":"from based58 import base58_check_decode"}],"quickstart":{"code":"from based58 import base58_encode, base58_decode\n\nencoded = base58_encode(b'hello world')\nprint(encoded)  # b'STV9KUJUjQJRyv7'\ndecoded = base58_decode(encoded)\nprint(decoded)  # b'hello world'","lang":"python","description":"Encode and decode bytes using Base58."},"warnings":[{"fix":"Use 'pip install based58' and import from 'based58'.","message":"Do not confuse with the 'base58' library. Both provide 'base58_encode'/'base58_decode' but are entirely different packages. Check your requirements file.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure input is bytes, not str. Use .encode() or .decode() as needed.","message":"As of version 0.1.1, the general 'encode'/'decode' functions are not provided; only bytes-to-bytes functions. Do not expect string-in/string-out behavior.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Convert strings to bytes: base58_encode('text'.encode()).","message":"The library expects input to be bytes. Passing a string will raise AttributeError or TypeError depending on Python version.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install based58' and change import to 'from based58 import base58_encode'.","cause":"Mistakenly using the 'base58' library instead of 'based58'.","error":"ImportError: cannot import name 'base58_encode' from 'base58'"},{"fix":"Encode the string: base58_encode('hello'.encode())","cause":"Passing a string directly to base58_encode or base58_decode.","error":"TypeError: expected bytes-like object, not str"},{"fix":"Use base58_encode instead of b58encode, e.g., 'from based58 import base58_encode'.","cause":"Using API naming from the 'base58' library on 'based58'.","error":"AttributeError: module 'based58' has no attribute 'b58encode'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}