EasyBase
EasyBase is a developer-friendly Python library to interact with Apache HBase . The original source code forked from HappyBase.
Feature highlight
easy using
support HBase Thrift 2 protocol(HBase Thrift 1 is NO longer supported)
using thriftpy2 instead of old thriftpy
Installation
pip install easybase
Usage
Connect
import easybase
host, port = 'localhost', 9000
tbl = 'test1'
conn = easybase.Connection(host=host, port=port)
table = conn.table(tbl)
rs = conn.scan(limit=10)
for row in rs:
print(row)
Create Table
table_def = {'cf1':dict(),
'cf2':{'max_versions':2000}}
conn.create_table('test1', table_def)
Write row to table
puts = {'cf1:c1': 'v1',
'cf1:c2': 'v2'
'cf2:c2': 'v3'}
tbl = conn.table('test1')
tbl.put(row='rk1', puts)
Get row from table
rk = 'rk1'
tbl = conn.table('test1')
rs = tbl.row(rk)
Scan rows
tbl = conn.table('test1')
scanner = tbl.scan(row_start='rk_0001', row_stop='rk_0100')
for row in scanner:
print(row)
Get all namespace
for ns in conn.list_namespaces():
print(ns)
You can get detail in DemoClient.py
License
MIT License http://www.opensource.org/licenses/MIT.
Metadata
Release files for easybase 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easybase-2.0.1.tar.gz | 36.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easybase-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.2 kB
Release files / easybase-2.0.1.tar.gz
| Download URL | easybase-2.0.1.tar.gz |
|---|---|
| Size | 36.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1e2d2e5a7899612fd80254f4e77f3003e6cd1dee3dc05a8e87c8d5e6659c87e
|
|
BLAKE2b-256 checksum How to use checksums |
64b711a8efe28eaa9207d68df8af4579226ab049d59179578270bc32f1c923a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / easybase-2.0.1-py3-none-any.whl
| Download URL | easybase-2.0.1-py3-none-any.whl |
|---|---|
| Size | 33.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a70b62453fd4745431c3f2a29f9d3f9c3062eeddd7d3d2e20cd7a308a67b897f
|
|
BLAKE2b-256 checksum How to use checksums |
63f30d01d62827bede310acb6fc17a87ff241324481544d9dcca42e10a6194d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|