python-bitcoinlib
The Swiss Army Knife of the Bitcoin protocol.
Decision gist · record as of 2026-08-14
Yes, if you need low-level Bitcoin protocol manipulation in Python. The library has no runtime dependencies, low install friction, and an active if aging maintenance status. The copyleft license is straightforward for open-source use. However, the last release was 2023-06-03 and updates are infrequent—verify compatibility with your Python version and requirements before relying on it for production systems.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires libssl-dev system library.
- Bitcoin Core v24.0 or later for RPC interface compatibility.
- Low install friction with no runtime dependencies.
License · maintenance · safety
copyleft license (copyleft) — Licensed under LGPLv3+, a copyleft license. Any derivative work or modification must be distributed under compatible terms; linking from proprietary code is permitted if the library remains separate.
last release 2023-06-03 (1168 days) · last repo commit 2025-03-14 · 1,950 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 420,420 downloads/mo, #6,791 on PyPI
Alternatives
Verify before relying
pip install python-bitcoinlib
from python_bitcoinlib.core import x, lx, b2x
# Work with Bitcoin data structures and protocol- Whether the package works with modern Python versions given no explicit requires_python constraint
- Current state of the 'in flux' modules and their production readiness
- Whether consensus-critical code has been audited for correctness against current Bitcoin Core
What it is and what it does
python-bitcoinlib is a low-level Python library for working directly with Bitcoin protocol internals. It provides data structures and tools for manipulating transactions, scripts, keys, serialization, and blockchain parameters, with a design philosophy that mirrors the Bitcoin codebase closely. The library separates consensus-critical code from non-consensus modules like RPC support, wallet utilities, and network communication.
The package is designed for developers who need to build tools that interact with Bitcoin at the protocol level—parsing transactions, validating scripts, constructing custom transactions, or communicating with nodes via RPC. It handles low-level details like endianness conversions and immutable/mutable object distinctions. The library requires libssl-dev and works with v24.0 or later for RPC functionality.
Use it for
- Build custom Bitcoin transaction builders or signers that need to manipulate transaction internals
- Parse and validate Bitcoin scripts or create custom script logic
- Interact with a node via RPC to query blockchain data or submit transactions
- Implement Bitcoin address generation, key management, or wallet-related functionality
- Analyze Bitcoin protocol data structures or implement consensus-critical validation logic
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need low-level Bitcoin protocol manipulation in Python.
The library has no runtime dependencies, low install friction, and an active if aging maintenance status. The copyleft license is straightforward for open-source use. However, the last release was 2023-06-03 and updates are infrequent—verify compatibility with your Python version and requirements before relying on it for production systems.
Install
python-bitcoinlib on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last release was 2023-06-03 and last commit 2025-03-14—so updates are infrequent but the repository remains active and not archived.
Requires libssl-dev system library. Bitcoin Core v24.0 or later for RPC interface compatibility.
License in practice
Licensed under LGPLv3+, a copyleft license. Any derivative work or modification must be distributed under compatible terms; linking from proprietary code is permitted if the library remains separate.
Quickstart
pip install python-bitcoinlib
from python_bitcoinlib.core import x, lx, b2x
# Work with Bitcoin data structures and protocol
Verify before relying
- Whether the package works with modern Python versions given no explicit requires_python constraint
- Current state of the 'in flux' modules and their production readiness
- Whether consensus-critical code has been audited for correctness against current Bitcoin Core
Package facts
| License | copyleft license copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 1,168 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 420,420 / month, #6,791 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Programming Language :: Python |
Evidence: python_bitcoinlib-0.12.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “bitcoin protocol library python”
- python-bitcoinlibProvides low-level Python tools to work with Bitcoin data structures,…
- breez-sdk-sparkPython bindings for the Breez Spark SDK, enabling non-custodial…
- python-bitcoinrpcProvides a JSON-RPC client library for communicating with Bitcoin…
Give your agent the search over MCP, or paste the wish link into any chat.
More Cryptography packages
Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.
cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.
Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.
PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.
See also dictknife · python-bitcoinrpc · bitcoin-utils · opentimestamps · bip32 · xrpl-py · slip10 · coincurve · forex-python · bitarray-hardbyte