Registry / database / happybase

happybase

JSON →
library1.3.0pypypi✓ verified 84d ago

HappyBase is a developer-friendly Python library to interact with Apache HBase, providing a Thrift-based client. Current version is 1.3.0, released in 2023. Release cadence is low, with occasional updates.

pip install happybase
INSTALL
IMPORT
SIG · HAPPYBASE
H
happybase
databasepythonv1.3.0
Install
2.0s avg
Import
362ms
Disk
25MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.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.382s · 26.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.342s · 28MB
25MB installed
● package 25MB
Code
Verified usage

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

Connection
from happybase import Connection
import happybase.Connection
HappyBase exports Connection at the package level; import from happybase, not as a submodule.

Connects to HBase Thrift server and lists tables.

import os from happybase import Connection host = os.environ.get('HBASE_HOST', 'localhost') port = int(os.environ.get('HBASE_PORT', 9090)) connection = Connection(host=host, port=port) print(connection.tables()) connection.close()
Debug
Known issues
breakingHappyBase 1.0+ dropped support for Python 2.7 and older Thrift versions.
fix
Upgrade to Python 3.6+ and install thrift>=0.10.
affects: <1.0.0
gotoHappyBase Connection does not automatically reconnect. If the Thrift server restarts, you must create a new Connection object.
fix
Wrap calls in try-except and recreate the connection on failure.
affects: all
deprecatedThe 'batch' method's 'walk' parameter is deprecated and will be removed.
fix
Use Table.scan() with row_prefix instead of batch(walk=True).
affects: >=1.2.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'thrift'
The thrift library is not installed.
fix
pip install thrift
TTransportException: Could not connect to localhost:9090
HBase Thrift server is not running or not reachable.
fix
Start the Thrift server with 'hbase thrift start' or check host/port.
TypeError: __init__() got an unexpected keyword argument 'port'
Using an older version of HappyBase that doesn't accept 'port' directly.
fix
Use 'host' and 'port' via a tuple: Connection(('localhost', 9090)) or upgrade to >=0.9.
Upgrade
Version history
1.3.0latest on PyPI · released Sep 26, 2025
Audit
Dependencies
thriftrequiredHappyBase uses Thrift for HBase communication
Agent activity
9 hits · last 30 days
node
8
Resources
happybase — pip install happybase · libregistry