--- id: bech32 version: "1.2.0" license: MIT license_treatment: permissive maintenance: abandoned --- # bech32 — Reference implementation for Bech32 and segwit addresses. License: permissive · Maintenance: abandoned · Downloads: 519.8K/mo ## What it is and what it does Bech32 is a reference implementation of the bech32 checksummed base32 encoding format, originally developed for Bitcoin segwit addresses and later adopted for Lightning Network invoices. The package provides functions to encode data into bech32 strings and decode them back, with built-in checksum validation to detect errors. The implementation is a Python port of the reference specification, with a modification to remove a length limit so it can handle longer Lightning invoice payloads. Since the package has no runtime dependencies and requires Python 3.5 or later, it installs cleanly and runs with minimal overhead. However, it has been archived and receives no maintenance, so it is suitable only for projects that need stable, unchanging bech32 functionality. Use it for: - Encode Bitcoin segwit addresses for wallet or exchange software. - Decode and validate bech32-encoded Lightning Network payment invoices. - Verify bech32 checksums to detect transmission or transcription errors in encoded data. - Integrate bech32 encoding into cryptocurrency address generation pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Encodes and decodes bech32-formatted strings, a checksummed base32 encoding scheme used for Bitcoin segwit addresses and Lightning invoices. Yes, if you need stable bech32 encoding and decoding for Bitcoin or Lightning applications and accept that the package will not receive updates. The implementation is mature, has no dependencies, and carries no known vulnerabilities. Do not install if you expect ongoing maintenance or compatibility updates with evolving standards. ## Install pip install bech32 uv add bech32 poetry add bech32 ## Installing bech32 Before you install: Installation is straightforward with no runtime dependencies. However, the package is archived and unmaintained since February 2020, with no updates for several years. Use only if you need stable, unchanging bech32 functionality and do not expect bug fixes or security patches. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install bech32 from bech32 import bech32_encode, bech32_decode # Encode to bech32 encoded = bech32_encode('bc', data) # Decode bech32 hrp, decoded = bech32_decode(encoded) Verify before relying: - Whether the implementation remains compatible with current bech32 specifications and Lightning invoice standards. - Whether the removal of the length limit (noted in the description) is still appropriate for all use cases. - Specific bit-width conversion capabilities and their correctness for cryptographic applications. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 519.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bech32 encoding decoding, bitcoin segwit address, lightning invoice encoding, base32 checksum encoding, bech32 reference implementation, bitcoin, encoding [View on SkillFed](https://skillfed.io/packages/bech32) · [View on PyPI](https://pypi.org/project/bech32/)